Skip to content

Commit

Permalink
Update to latest nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk committed Jun 18, 2024
1 parent 43068b6 commit 00e0eb4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions haskell/free-foil/src/Control/Monad/Foil/TH/MkFoilData.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ mkFoilData termT nameT scopeT patternT = do
let foilTermCons = map (toTermCon termTVars n l) termCons

return
[ DataD [] foilTermT (termTVars ++ [KindedTV n () (PromotedT ''Foil.S)]) Nothing foilTermCons []
, DataD [] foilScopeT (scopeTVars ++ [KindedTV n () (PromotedT ''Foil.S)]) Nothing foilScopeCons []
, DataD [] foilPatternT (patternTVars ++ [KindedTV n () (PromotedT ''Foil.S), KindedTV l () (PromotedT ''Foil.S)]) Nothing foilPatternCons []
[ DataD [] foilTermT (termTVars ++ [KindedTV n BndrReq (PromotedT ''Foil.S)]) Nothing foilTermCons []
, DataD [] foilScopeT (scopeTVars ++ [KindedTV n BndrReq (PromotedT ''Foil.S)]) Nothing foilScopeCons []
, DataD [] foilPatternT (patternTVars ++ [KindedTV n BndrReq (PromotedT ''Foil.S), KindedTV l BndrReq (PromotedT ''Foil.S)]) Nothing foilPatternCons []
]
where
foilTermT = mkName ("Foil" ++ nameBase termT)
Expand All @@ -41,7 +41,7 @@ mkFoilData termT nameT scopeT patternT = do
-- | Convert a constructor declaration for a raw pattern type
-- into a constructor for the scope-safe pattern type.
toPatternCon
:: [TyVarBndr ()]
:: [TyVarBndr BndrVis]
-> Name -- ^ Name for the starting scope type variable.
-> Con -- ^ Raw pattern constructor.
-> Q Con
Expand Down Expand Up @@ -82,7 +82,7 @@ mkFoilData termT nameT scopeT patternT = do

-- | Convert a constructor declaration for a raw scoped term
-- into a constructor for the scope-safe scoped term.
toScopeCon :: [TyVarBndr ()] -> Name -> Con -> Con
toScopeCon :: [TyVarBndr BndrVis] -> Name -> Con -> Con
toScopeCon _tvars n (NormalC conName params) =
NormalC foilConName (map toScopeParam params)
where
Expand All @@ -93,7 +93,7 @@ mkFoilData termT nameT scopeT patternT = do

-- | Convert a constructor declaration for a raw term
-- into a constructor for the scope-safe term.
toTermCon :: [TyVarBndr ()] -> Name -> Name -> Con -> Con
toTermCon :: [TyVarBndr BndrVis] -> Name -> Name -> Con -> Con
toTermCon tvars n l (NormalC conName params) =
GadtC [foilConName] (map toTermParam params) (PeelConT foilTermT (map (VarT . tvarName) tvars ++ [VarT n]))
where
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: nightly-2023-09-30
resolver: nightly-2024-06-18
packages:
- haskell/free-foil
- haskell/lambda-pi
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
packages: []
snapshots:
- completed:
sha256: 402c22fcb980c23c960ce8249d20c572f26abb1395a5d581e71244e7635bc578
size: 670169
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2023/9/30.yaml
original: nightly-2023-09-30
sha256: 60372fd94e0c083c6484f17181fd5634e530550a14be00a4c032862c514bd802
size: 650422
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2024/6/18.yaml
original: nightly-2024-06-18

0 comments on commit 00e0eb4

Please sign in to comment.