1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 17:04:47 +03:00

use ParseFail and ParseSucceed constructors

This commit is contained in:
Ayman Nadeem 2020-04-27 17:42:50 -04:00
parent 0af40b260a
commit d95440e4e6

View File

@ -14,6 +14,6 @@ import GHC.Generics (Generic, Generic1)
-- data If f a = If { ann :: a, condition :: f (Expr f a), consequence :: f (Stmt f a), alternative :: f (Stmt f a) }
-- @
-- When the parse fails, the f will be substituted with Err
data Err fail succeed = parseL (fail :: String) | parseR (succeed :: Symbol)
data Err fail succeed a = ParseFail { ann :: a } | ParseSucceed { ann :: a }
deriving (Eq, Foldable, Functor, Generic, Generic1, Ord, Show, Traversable)