Skip to content

Commit

Permalink
Mass eta reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
WoWaster committed Oct 14, 2024
1 parent 10329f1 commit b05c74f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lamagraph-compiler/src/Lamagraph/Compiler/Parser/SrcLoc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ mkSrcLoc :: Text -> Int -> Int -> SrcLoc
mkSrcLoc file line column = RealSrcLoc (mkRealSrcLoc file line column)

mkRealSrcLoc :: Text -> Int -> Int -> RealSrcLoc
mkRealSrcLoc file line column = RealSrcLoc' file line column
mkRealSrcLoc = RealSrcLoc'

generatedSrcLoc :: SrcLoc
generatedSrcLoc = UnhelpfulLoc "<compiler-generated code>"
Expand Down Expand Up @@ -179,7 +179,7 @@ type Located = GenLocated SrcSpan
type RealLocated = GenLocated RealSrcSpan

mkBadLocated :: Text -> e -> Located e
mkBadLocated str e = L (mkBadSrcSpan str) e
mkBadLocated str = L (mkBadSrcSpan str)

combineLocs :: Located a -> Located b -> SrcSpan
combineLocs (L loc1 _) (L loc2 _) = combineSrcSpans loc1 loc2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ newtype Longident = Longident (NonEmpty Text)
deriving (Show)

mkLongident :: NonEmpty Text -> Longident
mkLongident s = Longident s
mkLongident = Longident

type LLongident pass = XLocated pass Longident
2 changes: 1 addition & 1 deletion lamagraph-compiler/src/Lamagraph/Compiler/Syntax/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ data LmlType pass
-- - @/typeconstr/@ when @types = []@
-- - @/typexpr/ /typeconstr/@ when @types = [type]@
-- - @( /typexpr/ { , /typexpr/ } ) /typeconstr/@ when @types = [type1, ..., typen]@
LmlTyConstr (XLmlTyConstr pass) (LLongident pass) [(LLmlType pass)]
LmlTyConstr (XLmlTyConstr pass) (LLongident pass) [LLmlType pass]
| XLmlType !(XXType pass)

type ForallLmlType (tc :: Type -> Constraint) pass =
Expand Down

0 comments on commit b05c74f

Please sign in to comment.