23 lines
533 B
Haskell
23 lines
533 B
Haskell
{-# LANGUAGE Safe #-}
|
|
{-# LANGUAGE InstanceSigs #-}
|
|
module Language.Scalie.Ast.Expression (Expression(..)) where
|
|
|
|
import Prelude (Integer)
|
|
import Data.Kind (Type)
|
|
import Text.Show (Show)
|
|
import Text.Read (Read)
|
|
import Data.Eq (Eq)
|
|
import Test.QuickCheck (Arbitrary (arbitrary), Gen, oneof)
|
|
import Data.Functor ((<$>))
|
|
|
|
type Expression :: Type
|
|
data Expression
|
|
= RawInt Integer
|
|
deriving stock (Show, Read, Eq)
|
|
|
|
instance Arbitrary Expression where
|
|
arbitrary :: Gen Expression
|
|
arbitrary = oneof
|
|
[ RawInt <$> arbitrary
|
|
]
|
|
|