Commit 458d41b4 authored by Kai-Oliver Prott's avatar Kai-Oliver Prott

Fix compilation error (due to incomplete merge)

parent a3b68d83
......@@ -77,7 +77,7 @@ import Env.Value (ValueEnv, ValueInfo (..))
syntaxCheck :: [KnownExtension] -> TCEnv -> ValueEnv -> Module ()
-> ((Module (), [KnownExtension]), [Message])
syntaxCheck exts tcEnv vEnv mdl@(Module _ m _ _ ds) =
syntaxCheck exts tcEnv vEnv mdl@(Module _ _ m _ _ ds) =
case findMultiples cons of
[] -> case findMultiples (ls ++ fs ++ cons ++ cs) of
[] -> runSC (checkModule mdl) state
......
......@@ -29,6 +29,7 @@ import qualified Data.Map as Map (Map, empty, insert, lookup)
import qualified Data.Set as Set (Set, empty, insert, member)
import Curry.Base.Ident
import Curry.Base.SpanInfo
import Curry.FlatCurry.Annotated.Goodies (typeName)
import Curry.FlatCurry.Annotated.Type
import qualified Curry.Syntax as CS
......@@ -118,7 +119,7 @@ data FlatEnv = FlatEnv
-- Runs a 'FlatState' action and returns the result
run :: CompilerEnv -> CS.Module Type -> FlatState a -> a
run env (CS.Module _ mid es is ds) act = S.evalState act env0
run env (CS.Module _ _ mid es is ds) act = S.evalState act env0
where
es' = case es of Just (CS.Exporting _ e) -> e
_ -> []
......@@ -133,7 +134,7 @@ run env (CS.Module _ mid es is ds) act = S.evalState act env0
, tyEnv = valueEnv env
, tcEnv = tyConsEnv env
-- Fixity declarations
, fixities = [ CS.IInfixDecl p fix (mkPrec mPrec) (qualifyWith mid o)
, fixities = [ CS.IInfixDecl (spanInfo2Pos p) fix (mkPrec mPrec) (qualifyWith mid o)
| CS.InfixDecl p fix mPrec os <- ds, o <- os
]
-- Type synonyms in the module
......@@ -144,15 +145,15 @@ run env (CS.Module _ mid es is ds) act = S.evalState act env0
-- Builds a table containing all exported identifiers from a module.
buildTypeExports :: ModuleIdent -> CS.Export -> Set.Set Ident -> Set.Set Ident
buildTypeExports mid (CS.ExportTypeWith tc _)
buildTypeExports mid (CS.ExportTypeWith _ tc _)
| isLocalIdent mid tc = Set.insert (unqualify tc)
buildTypeExports _ _ = id
-- Builds a table containing all exported identifiers from a module.
buildValueExports :: ModuleIdent -> CS.Export -> Set.Set Ident -> Set.Set Ident
buildValueExports mid (CS.Export q)
buildValueExports mid (CS.Export _ q)
| isLocalIdent mid q = Set.insert (unqualify q)
buildValueExports mid (CS.ExportTypeWith tc cs)
buildValueExports mid (CS.ExportTypeWith _ tc cs)
| isLocalIdent mid tc = flip (foldr Set.insert) cs
buildValueExports _ _ = id
......
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