Commit 8141341f authored by Björn Peemöller 's avatar Björn Peemöller
Browse files

Refactored and improved the simplifier

parent 44ec8933
......@@ -204,8 +204,6 @@ trConstrDecl (IL.ConstrDecl qid tys) = do
whenFlatCurry (return [flatCons]) (return [flatCons | vis == Public]) -- TODO: whenFlatCurry
trType :: IL.Type -> FlatState TypeExpr
trType (IL.TypeConstructor t [ty])
| qualName t == "Identity" = trType ty -- TODO: documentation
trType (IL.TypeConstructor t tys) = TCons <$> trTypeIdent t <*> mapM trType tys
trType (IL.TypeVariable idx) = return $ TVar $ abs idx
trType (IL.TypeArrow ty1 ty2) = FuncType <$> trType ty1 <*> trType ty2
......
This diff is collapsed.
f x = g x
where g y = y
h x = let y = not x in not y
f x | all (' ' ==) cs = c where (c:cs) = x
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment