Reuse buildLet
in Buildable
instance for Let
This commit is contained in:
parent
d2ec1c1cc2
commit
47eb966f8e
|
@ -134,13 +134,7 @@ data Let a = Let
|
|||
} deriving (Functor, Foldable, Traversable, Show)
|
||||
|
||||
instance Buildable a => Buildable (Let a) where
|
||||
build (Let f as r) =
|
||||
"let "
|
||||
<> build f
|
||||
<> " "
|
||||
<> foldMap (\(x, t) -> "(" <> build x <> " : " <> build t <> ")") as
|
||||
<> "= "
|
||||
<> build r
|
||||
build = buildLet
|
||||
|
||||
-- | Syntax tree for expressions
|
||||
data Expr a
|
||||
|
|
Loading…
Reference in New Issue
Block a user