Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 122b631

Browse files
committed
Use Void to represent closed terms.
1 parent 5dbf727 commit 122b631

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

semantic-core/src/Analysis/Typecheck.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import Data.Scope
3333
import qualified Data.Set as Set
3434
import Data.Stack
3535
import Data.Term
36+
import Data.Void
3637
import GHC.Generics (Generic1)
3738
import Prelude hiding (fail)
3839

@@ -78,11 +79,11 @@ forAll n body = send (PForAll (Data.Scope.bind1 n body))
7879
forAlls :: (Eq a, Carrier sig m, Member Polytype sig, Foldable t) => t a -> m a -> m a
7980
forAlls ns body = foldr forAll body ns
8081

81-
generalize :: Term Monotype Meta -> Term (Polytype :+: Monotype) Gensym
82+
generalize :: Term Monotype Meta -> Term (Polytype :+: Monotype) Void
8283
generalize ty = fromJust (closed (forAlls (IntSet.toList (mvs ty)) (hoistTerm R ty)))
8384

8485

85-
typecheckingFlowInsensitive :: [File (Term Core.Core Name)] -> (Heap Name (Term Monotype Meta), [File (Either (Loc, String) (Term (Polytype :+: Monotype) Gensym))])
86+
typecheckingFlowInsensitive :: [File (Term Core.Core Name)] -> (Heap Name (Term Monotype Meta), [File (Either (Loc, String) (Term (Polytype :+: Monotype) Void))])
8687
typecheckingFlowInsensitive
8788
= run
8889
. runFresh

0 commit comments

Comments
 (0)