@@ -162,10 +162,10 @@ type family AppendEffects (r :: EffectRow) (s :: EffectRow) :: EffectRow where
162162-- However, just manually implementing it here seems easier.
163163
164164-- | Effects needed at the top level.
165- type TopEffects = '[Error DiscoError , State TopInfo , Output ( Message () ) , Embed IO , Final (H. InputT IO )]
165+ type TopEffects = '[Error DiscoError , State TopInfo , Output Message , Embed IO , Final (H. InputT IO )]
166166
167167-- | Effects needed for evaluation.
168- type EvalEffects = [Error EvalError , Random , LFresh , Output ( Message () ) , State Mem ]
168+ type EvalEffects = [Error EvalError , Random , LFresh , Output Message , State Mem ]
169169
170170-- XXX write about order.
171171-- memory, counter etc. should not be reset by errors.
@@ -191,11 +191,11 @@ runDisco cfg =
191191 void
192192 . H. runInputT inputSettings
193193 . runFinal @ (H. InputT IO )
194- . embedToFinal
194+ . embedToFinal @ ( H. InputT IO )
195195 . runEmbedded @ _ @ (H. InputT IO ) liftIO
196196 . runOutputSem (handleMsg msgFilter) -- Handle Output Message via printing to console
197197 . stateToIO (initTopInfo cfg) -- Run State TopInfo via an IORef
198- . inputToState -- Dispatch Input TopInfo effect via State effect
198+ . inputToState @ TopInfo -- Dispatch Input TopInfo effect via State effect
199199 . runState emptyMem -- Start with empty memory
200200 . outputDiscoErrors -- Output any top-level errors
201201 . runLFresh -- Generate locally fresh names
@@ -293,7 +293,7 @@ typecheckTop tcm = do
293293-- The 'Resolver' argument specifies where to look for imported
294294-- modules.
295295loadDiscoModule ::
296- Members '[State TopInfo , Output ( Message ann ) , Random , State Mem , Error DiscoError , Embed IO ] r =>
296+ Members '[State TopInfo , Output Message , Random , State Mem , Error DiscoError , Embed IO ] r =>
297297 Bool ->
298298 Resolver ->
299299 FilePath ->
@@ -307,7 +307,7 @@ loadDiscoModule quiet resolver =
307307-- module loaded from disk). Used for e.g. blocks/modules entered
308308-- at the REPL prompt.
309309loadParsedDiscoModule ::
310- Members '[State TopInfo , Output ( Message ann ) , Random , State Mem , Error DiscoError , Embed IO ] r =>
310+ Members '[State TopInfo , Output Message , Random , State Mem , Error DiscoError , Embed IO ] r =>
311311 Bool ->
312312 Resolver ->
313313 ModuleName ->
@@ -321,7 +321,7 @@ loadParsedDiscoModule quiet resolver =
321321-- any imported module more than once. Resolve the module, load and
322322-- parse it, then call 'loadParsedDiscoModule''.
323323loadDiscoModule' ::
324- Members '[State TopInfo , Output ( Message ann ) , Random , State Mem , Error DiscoError , Embed IO ] r =>
324+ Members '[State TopInfo , Output Message , Random , State Mem , Error DiscoError , Embed IO ] r =>
325325 Bool ->
326326 Resolver ->
327327 [ModuleName ] ->
@@ -353,7 +353,7 @@ stdLib = ["list", "container"]
353353-- 'LoadingMode' parameter is 'REPL'. Recursively load all its
354354-- imports, then typecheck it.
355355loadParsedDiscoModule' ::
356- Members '[State TopInfo , Output ( Message ann ) , Random , State Mem , Error DiscoError , Embed IO ] r =>
356+ Members '[State TopInfo , Output Message , Random , State Mem , Error DiscoError , Embed IO ] r =>
357357 Bool ->
358358 LoadingMode ->
359359 Resolver ->
@@ -399,7 +399,7 @@ loadParsedDiscoModule' quiet mode resolver inProcess name cm@(Module _ mns _ _ _
399399
400400-- | Try loading the contents of a file from the filesystem, emitting
401401-- an error if it's not found.
402- loadFile :: Members '[Output ( Message ann ) , Embed IO ] r => FilePath -> Sem r (Maybe String )
402+ loadFile :: Members '[Output Message , Embed IO ] r => FilePath -> Sem r (Maybe String )
403403loadFile file = do
404404 res <- liftIO $ handle @ SomeException (return . Left ) (Right <$> readFile file)
405405 case res of
@@ -409,7 +409,7 @@ loadFile file = do
409409-- | Add things from the given module to the set of currently loaded
410410-- things.
411411addToREPLModule ::
412- Members '[Error DiscoError , State TopInfo , Random , State Mem , Output ( Message ann ) ] r =>
412+ Members '[Error DiscoError , State TopInfo , Random , State Mem , Output Message ] r =>
413413 ModuleInfo ->
414414 Sem r ()
415415addToREPLModule mi = modify @ TopInfo (replModInfo <>~ mi)
@@ -419,7 +419,7 @@ addToREPLModule mi = modify @TopInfo (replModInfo <>~ mi)
419419-- term definitions, documentation, types, and type definitions.
420420-- Replaces any previously loaded module.
421421setREPLModule ::
422- Members '[State TopInfo , Random , Error EvalError , State Mem , Output ( Message ann ) ] r =>
422+ Members '[State TopInfo , Random , Error EvalError , State Mem , Output Message ] r =>
423423 ModuleInfo ->
424424 Sem r ()
425425setREPLModule mi = do
@@ -450,7 +450,7 @@ loadDef x body = do
450450 v <- inputToState @ TopInfo . inputTopEnv $ eval body
451451 modify @ TopInfo $ topEnv %~ Ctx. insert x v
452452
453- checkExhaustive :: Members '[Fresh , Output ( Message ann ) , Embed IO ] r => TyDefCtx -> Defn -> Sem r ()
453+ checkExhaustive :: Members '[Fresh , Output Message , Embed IO ] r => TyDefCtx -> Defn -> Sem r ()
454454checkExhaustive tyDefCtx (Defn name argsType _ boundClauses) = do
455455 clauses <- NonEmpty. map fst <$> mapM unbind boundClauses
456456 runReader @ TyDefCtx tyDefCtx $ checkClauses name argsType clauses
0 commit comments