diff options
| author | Kleidi Bujari <mail@4kb.net> | 2026-10-13 23:44:16 -0700 |
|---|---|---|
| committer | Kleidi Bujari <mail@4kb.net> | 2026-10-13 23:48:06 -0700 |
| commit | 61a467c1be9895cc8c22b73ac0ff4350047d43e6 (patch) | |
| tree | 563be1036dd60cbf2751e916787cbd3b35e42d2d /src/Hint/Data.hs | |
| parent | 479a316905ea882375aefe7944f9c02b176a55e2 (diff) | |
| download | hint-master.tar.gz hint-master.tar.bz2 hint-master.zip | |
Diffstat (limited to 'src/Hint/Data.hs')
| -rw-r--r-- | src/Hint/Data.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Hint/Data.hs b/src/Hint/Data.hs new file mode 100644 index 0000000..a5faa44 --- /dev/null +++ b/src/Hint/Data.hs @@ -0,0 +1,25 @@ +module Hint.Data where + +import Data.Text (Text) +import Data.String +import qualified Data.Text as T + +newtype Identifier = Identifier Text + deriving (Show, Ord, Eq) + +instance IsString Identifier where + fromString = Identifier . T.pack + +data Literal + = Int Int + | Float Double + | Boolean Bool + | String Text + deriving (Show, Eq) + +data Expr + = Literal Literal + | If Expr Expr Expr + | Bind Identifier Expr Expr + | Ident Identifier + deriving (Show, Eq) |
