mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
replace token type synonym with example datatype of kind (*->*)->*->*
This commit is contained in:
parent
87349a4d55
commit
09dfa147b7
@ -9,8 +9,9 @@ import GHC.Generics (Generic, Generic1)
|
|||||||
--
|
--
|
||||||
-- Error types are isomorphic to Either.
|
-- Error types are isomorphic to Either.
|
||||||
--
|
--
|
||||||
|
-- For example, consider the following:
|
||||||
-- @
|
-- @
|
||||||
-- type AnonymousPlus = Token "+" 123
|
-- data If f a = If { ann :: a, condition :: f (Expr f a), consequence :: f (Stmt f a), alternative :: f (Stmt f a) }
|
||||||
-- @
|
-- @
|
||||||
data Err fail succeed = parseL (fail :: String) | parseR (succeed :: Symbol)
|
data Err fail succeed = parseL (fail :: String) | parseR (succeed :: Symbol)
|
||||||
deriving (Eq, Foldable, Functor, Generic, Generic1, Ord, Show, Traversable)
|
deriving (Eq, Foldable, Functor, Generic, Generic1, Ord, Show, Traversable)
|
||||||
|
Loading…
Reference in New Issue
Block a user