module Helium.StaticAnalysis.Inferencers.TypeInferencing where
import Top.Types
import Helium.StaticAnalysis.Miscellaneous.TypeConversion
import Helium.StaticAnalysis.Messages.Messages
import Helium.StaticAnalysis.Messages.TypeErrors
import Helium.StaticAnalysis.Messages.Warnings
import Helium.StaticAnalysis.Miscellaneous.ConstraintInfo
import Helium.StaticAnalysis.Miscellaneous.DoublyLinkedTree
import Helium.StaticAnalysis.Miscellaneous.UHA_Source
import Helium.StaticAnalysis.Miscellaneous.TypeConstraints
import Top.Ordering.Tree
import Helium.StaticAnalysis.Inferencers.SelectConstraintSolver (selectConstraintSolver)
import Top.Solver (SolveResult(..), LogEntries)
import Helium.StaticAnalysis.Heuristics.HeuristicsInfo (makeUnifier, skip_UHA_FB_RHS)
import Helium.StaticAnalysis.Inferencers.BindingGroupAnalysis
import Helium.Syntax.UHA_Syntax
import Helium.Syntax.UHA_Range
import Helium.Utils.Utils (internalError, hole)
import Helium.ModuleSystem.ImportEnvironment hiding (setTypeSynonyms)
import Helium.ModuleSystem.DictionaryEnvironment
import Helium.Main.Args
import qualified Data.Map as M
import Data.Maybe
import Data.List
import Helium.StaticAnalysis.Directives.Matchers
import Helium.StaticAnalysis.Directives.TS_Apply (applyTypingStrategy, matchInformation)
import Helium.StaticAnalysis.Directives.TS_CoreSyntax
import Helium.StaticAnalysis.Directives.TS_Attributes
import Helium.Syntax.UHA_Utils
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
typeInferencing :: [Option] -> ImportEnvironment -> Module
-> (IO (), DictionaryEnvironment, TypeEnvironment, TypeErrors, Warnings)
typeInferencing options importEnv module_ =
let res = wrap_Module (sem_Module module_) Inh_Module {
importEnvironment_Inh_Module = importEnv,
options_Inh_Module = options }
debugIO = putStrLn (show $ logEntries_Syn_Module res)
in (debugIO, dictionaryEnvironment_Syn_Module res, toplevelTypes_Syn_Module res, typeErrors_Syn_Module res, warnings_Syn_Module res)
proximaTypeInferencing :: [Option] -> ImportEnvironment -> Module
-> (TypeErrors, Warnings, TypeEnvironment, [(Range, TpScheme)])
proximaTypeInferencing options importEnv module_ =
let res = wrap_Module (sem_Module module_) Inh_Module {
importEnvironment_Inh_Module = importEnv,
options_Inh_Module = options }
localTypeSchemes = typeSchemesInInfoTree (substitutionFromResult $ solveResult_Syn_Module res)
(qualifiersFromResult $ solveResult_Syn_Module res)
(infoTree_Syn_Module res)
in (typeErrors_Syn_Module res, warnings_Syn_Module res, toplevelTypes_Syn_Module res, localTypeSchemes)
getRequiredDictionaries :: OrderedTypeSynonyms -> Tp -> TpScheme -> Predicates
getRequiredDictionaries synonyms useType defType =
expandPredicates synonyms (matchTypeWithScheme synonyms useType defType)
matchTypeWithScheme :: OrderedTypeSynonyms -> Tp -> TpScheme -> Predicates
matchTypeWithScheme synonyms tp scheme =
let (ips, itp) = split . snd . instantiate 0 . freezeFTV $ scheme
in case mguWithTypeSynonyms synonyms itp (freezeVariablesInType tp) of
Left _ -> internalError "TypeInferenceOverloading.ag" "matchTypeWithScheme" "no unification"
Right (_, sub) ->
let f (Predicate s typ) = Predicate s (unfreezeVariablesInType $ sub |-> typ)
in map f ips
resolveOverloading :: ClassEnvironment -> Name -> Predicates -> Predicates ->
DictionaryEnvironment -> DictionaryEnvironment
resolveOverloading classEnv name availablePredicates predicates dEnv =
let maybeTrees = map (makeDictionaryTree classEnv availablePredicates) predicates
in if all isJust maybeTrees
then addForVariable name (map fromJust maybeTrees) dEnv
else internalError "TypeInferenceOverloading.ag" "resolveOverloading" ("cannot resolve overloading (" ++ show name ++ ")")
expandPredicates :: OrderedTypeSynonyms -> Predicates -> Predicates
expandPredicates synonyms = map (expandPredicate synonyms)
expandPredicate :: OrderedTypeSynonyms -> Predicate -> Predicate
expandPredicate (_, synonyms) (Predicate className tp) = Predicate className (expandType synonyms tp)
findInferredTypes :: M.Map Int (Scheme Predicates) -> M.Map Name (Sigma Predicates) -> TypeEnvironment
findInferredTypes typeschemeMap =
let err = internalError "TypeInferenceCollect.ag" "findInferredTypes" "could not find type scheme variable"
f :: Sigma Predicates -> TpScheme
f (SigmaVar i) = M.findWithDefault err i typeschemeMap
f (SigmaScheme ts) = ts
in M.map f
missingTypeSignature :: Bool -> Names -> TypeEnvironment -> Warnings
missingTypeSignature topLevel simplePats =
let
makeWarning (name, scheme) =
let fromSimple = name `elem` simplePats && isOverloaded scheme
in [ NoTypeDef name scheme topLevel fromSimple | null (ftv scheme) && (topLevel || fromSimple) ]
in concatMap makeWarning . M.assocs
restrictedNameErrors :: TypeEnvironment -> Names -> TypeErrors
restrictedNameErrors env =
let f name = case M.lookup name env of
Just scheme -> [ makeRestrictedButOverloadedError name scheme | isOverloaded scheme ]
Nothing -> []
in concatMap f
makeLocalTypeEnv :: TypeEnvironment -> BindingGroups -> M.Map NameWithRange TpScheme
makeLocalTypeEnv local groups =
let (environment, _, _) = concatBindingGroups groups
names = M.keys environment
f x = maybe err id (find (==x) names)
err = internalError "TypeInferenceCollect.ag" "makeLocalTypeEnv" "could not find name"
in M.fromList [ (NameWithRange (f name), scheme) | (name, scheme) <- M.assocs local ]
isSimplePattern :: Pattern -> Bool
isSimplePattern pattern =
case pattern of
Pattern_Variable _ _ -> True
Pattern_Parenthesized _ p -> isSimplePattern p
_ -> False
globalInfoError :: a
globalInfoError = internalError "GlobalInfo.ag" "n/a" "global info not available"
type ScopeInfo = ( [Names]
, [Name]
, [(Name, Name)]
)
changeOfScope :: Names -> Names -> Names -> (Names, Names, ScopeInfo)
changeOfScope names unboundNames namesInScope =
let (uniqueNames, duplicatedNames) = uniqueAppearance names
unusedNames = uniqueNames \\ unboundNames
shadowedNames = let f n = [ (n, n') | n' <- namesInScope, n == n' ]
in concatMap f uniqueNames
in ( uniqueNames ++ map head duplicatedNames ++ (namesInScope \\ names)
, unboundNames \\ names
, (duplicatedNames, unusedNames, shadowedNames)
)
uniqueAppearance :: Ord a => [a] -> ([a],[[a]])
uniqueAppearance = Prelude.foldr myInsert ([],[]) . group . sort
where myInsert [x] (as,bs) = (x:as,bs)
myInsert xs (as,bs) = (as,xs:bs)
nextUnique :: Num a => a -> (a, a)
nextUnique n = (n+1, n)
matchConverter0 :: [([String],())] -> ()
matchConverter0 = const ()
matchConverter1 :: [([String],a)] -> [(a,[String])]
matchConverter1 = map (\(a,b) -> (b,a))
matchConverter2 :: [([String],(a,b))] -> ([(a,[String])],[(b,[String])])
matchConverter2 = let localInsert (metas,(a,b)) (as,bs) = ((a,metas):as,(b,metas):bs)
in foldr localInsert ([],[])
matchConverter3 :: [([String],(a,b,c))] -> ([(a,[String])],[(b,[String])],[(c,[String])])
matchConverter3 = let localInsert (metas,(a,b,c)) (as,bs,cs) = ((a,metas):as,(b,metas):bs,(c,metas):cs)
in foldr localInsert ([],[],[])
allMatch :: [Maybe [a]] -> Maybe [a]
allMatch = rec_ []
where rec_ xs [] = Just xs
rec_ _ (Nothing:_) = Nothing
rec_ xs (Just ys:rest) = rec_ (ys ++ xs) rest
data Match a = NoMatch | NonTerminalMatch a | MetaVariableMatch String
instance Show (Match a) where
show (NoMatch) = "NoMatch"
show (NonTerminalMatch _) = "NonTerminal ??"
show (MetaVariableMatch s) = "MetaVariableMatch "++show s
expressionVariableMatcher :: Expression -> Maybe String
expressionVariableMatcher expr =
case expr of
Expression_Variable _ name -> Just (show name)
_ -> Nothing
match0 :: MetaVariableInfo -> Int -> (Expression -> Maybe ())
-> [(Expression, [String])]
-> [((Expression, [String]), Core_TypingStrategy)]
-> [[Maybe MetaVariableTable]]
-> ((), [Maybe MetaVariableTable], ConstraintSet, Assumptions, Int, IO ())
match0 = generalMatch expressionVariableMatcher matchConverter0
match1 :: MetaVariableInfo -> Int -> (Expression -> Maybe a)
-> [(Expression, [String])]
-> [((Expression, [String]), Core_TypingStrategy)]
-> [[Maybe MetaVariableTable]]
-> ([(a, [String])], [Maybe MetaVariableTable],
ConstraintSet, Assumptions, Int, IO ())
match1 = generalMatch expressionVariableMatcher matchConverter1
match2 :: MetaVariableInfo -> Int -> (Expression -> Maybe (a, b))
-> [(Expression, [String])]
-> [((Expression, [String]), Core_TypingStrategy)]
-> [[Maybe MetaVariableTable]]
-> (([(a, [String])], [(b, [String])]), [Maybe MetaVariableTable],
ConstraintSet, Assumptions, Int, IO ())
match2 = generalMatch expressionVariableMatcher matchConverter2
match3 :: MetaVariableInfo -> Int -> (Expression -> Maybe (a, b, c))
-> [(Expression, [String])]
-> [((Expression, [String]), Core_TypingStrategy)]
-> [[Maybe MetaVariableTable]]
-> (([(a, [String])], [(b, [String])], [(c, [String])]),
[Maybe MetaVariableTable], ConstraintSet,
Assumptions, Int, IO ())
match3 = generalMatch expressionVariableMatcher matchConverter3
match0' :: (a -> Maybe ()) -> [(a, [String])]
-> [((a, [String]), Core_TypingStrategy)]
-> [[Maybe MetaVariableTable]]
-> ((), [Maybe MetaVariableTable], ConstraintSet,
Assumptions, Int, IO ())
match0' = generalMatch noMatch matchConverter0 noMetaVariableInfo 0
match1' :: (a -> Maybe b) -> [(a, [String])]
-> [((a, [String]), Core_TypingStrategy)]
-> [[Maybe MetaVariableTable]] ->
([(b, [String])], [Maybe MetaVariableTable],
ConstraintSet, Assumptions, Int, IO ())
match1' = generalMatch noMatch matchConverter1 noMetaVariableInfo 0
match2' :: (n -> Maybe (a, b)) -> [(n, [String])]
-> [((n, [String]), Core_TypingStrategy)]
-> [[Maybe MetaVariableTable]]
-> (([(a, [String])], [(b, [String])]),
[Maybe MetaVariableTable], ConstraintSet, Assumptions, Int, IO ())
match2' = generalMatch noMatch matchConverter2 noMetaVariableInfo 0
matchOnlyVariable :: MetaVariableInfo -> [(Expression, [String])] -> [Maybe MetaVariableTable]
matchOnlyVariable infoTuple tryPats =
let ((),matches,_,_,_,_) = match0 infoTuple 0 noMatch tryPats [] []
in matches
noMatch :: a -> Maybe b
noMatch = const Nothing
noMetaVariableInfo :: a
noMetaVariableInfo = internalError "PatternMatching.ag" "noMetaVariableInfo" ""
generalMatch :: (nonTerminal -> Maybe String)
-> ([([String], childrenTuple)] -> childrenResult)
-> MetaVariableInfo
-> Int
-> (nonTerminal -> Maybe childrenTuple)
-> [(nonTerminal, [String])]
-> [((nonTerminal, [String]), Core_TypingStrategy)]
-> [[Maybe MetaVariableTable]]
-> ( childrenResult
, [Maybe MetaVariableTable]
, ConstraintSet
, Assumptions
, Int
, IO ()
)
generalMatch exprVarMatcher converter metaInfo unique matcher tryPats allPats childrenResults =
let match (expr,metas) =
case exprVarMatcher expr of
Just s | s `elem` metas -> MetaVariableMatch s
_ -> case matcher expr of
Just x -> NonTerminalMatch (metas,x)
Nothing -> NoMatch
(allPatterns, allStrategies) = unzip allPats
matchListTry = map match tryPats
matchListNew = map match allPatterns
matchNTTry = [ x | NonTerminalMatch x <- matchListTry ]
matchNTNew = [ x | NonTerminalMatch x <- matchListNew ]
forChildren = converter (matchNTTry ++ matchNTNew)
numberOfTry = length matchNTTry
(resultTry,resultNew) = unzip . map (splitAt numberOfTry) $
if null childrenResults
then [repeat (Just [])]
else childrenResults
inspectMatch m (res, nts) =
case m of
NoMatch -> (Nothing:res, nts)
NonTerminalMatch _ -> (allMatch (head nts):res, tail nts)
MetaVariableMatch s -> (Just [(s, metaInfo)]:res, nts)
result = fst (foldr inspectMatch ([],reverse $ transpose resultTry) matchListTry)
complete = let (list,_) = foldr inspectMatch ([],reverse $ transpose resultNew) matchListNew
in [ (x, y) | (Just x, y) <- zip list allStrategies ]
(assumptions, constraintSet, debugIO, newUnique) =
case complete of
[] -> (getAssumptions metaInfo, getConstraintSet metaInfo, return (), unique)
(childrenInfo, typingStrategy):_
-> applyTypingStrategy typingStrategy metaInfo childrenInfo unique
in (forChildren, result, constraintSet, assumptions, newUnique, debugIO)
pmError :: String -> String -> a
pmError = internalError "PatternMatchWarnings"
expandTypeFromImportEnvironment :: ImportEnvironment -> Tp -> Tp
expandTypeFromImportEnvironment env = expandType (snd $ getOrderedTypeSynonyms env)
patternMatchWarnings :: Substitution substitution
=> ImportEnvironment
-> substitution
-> Tp
-> (Tp -> Tps)
-> [([PatternElement], Bool)]
-> Range
-> Maybe Name
-> Bool
-> [Warning]
-> String
-> String
-> [Warning]
patternMatchWarnings impenv sub tp strip elementss rng name parens unrwars place sym
= unreachablewarnings ++ missingwarnings
where
env = importEnvironmentToEnv impenv
exprtype = expandTypeFromImportEnvironment impenv $ sub |-> tp
types = strip exprtype
unreachables = unreachable impenv types $ map (\((a, _), c) -> (a, c)) $ filter (not.snd.fst) $ zip elementss [0..]
missing = complement impenv types $ map fst elementss
unreachablewarnings = map (unrwars !!) unreachables
missingwarnings
| null $ unMissing missing = []
| otherwise = [MissingPatterns rng name exprtype (map (nicePattern parens env) $ missingList missing) place sym]
(|^|) :: (a -> Bool) -> (a -> Bool) -> a -> Bool
(|^|) f g x = f x || g x
type Env = [(Tp, (Name, [Tp]))]
importEnvironmentToEnv :: ImportEnvironment -> [(Tp, (Name, [Tp]))]
importEnvironmentToEnv = map rearrange . M.assocs . valueConstructors
nrOfArguments :: Env -> String -> Int
nrOfArguments env con | isTupleConstructor con = length con 1
| otherwise = case lookup (nameFromString con) $ map snd env
of Just args -> length args
Nothing -> 0
rearrange :: (Name, TpScheme) -> (Tp, (Name, [Tp]))
rearrange (name, tpscheme) = let (args, res) = functionSpine $ unqualify $ unquantify tpscheme
in (res, (name, args))
constructors :: ImportEnvironment -> Tp -> [(Name, [Tp])]
constructors _ (TVar _) = []
constructors impenv tp | isTupleConstructor name = [tupleconstructor]
| otherwise = map expand $ concatMap (substitute tp) $ importEnvironmentToEnv impenv
where
name :: String
name = unTCon $ fst $ leftSpine tp
tupleconstructor :: (Name, [Tp])
tupleconstructor = (nameFromString name, snd $ leftSpine tp)
unTCon :: Tp -> String
unTCon (TCon c) = c
unTCon tp' = pmError "unTCon" $ "type " ++ show tp' ++ " is not a TCon"
expand :: (Name, [Tp]) -> (Name, [Tp])
expand (n, ts) = (n, map (expandTypeFromImportEnvironment impenv) ts)
substitute :: Tp -> (Tp, (Name, [Tp])) -> [(Name, [Tp])]
substitute t1 (t2, (con, args)) = let (c1, ts1) = leftSpine t1
(c2, ts2) = leftSpine t2
sub = listToSubstitution $ zip (map unTVar ts2) ts1
in if c1 == c2
then [(con, map (sub |->) args)]
else []
where
unTVar :: Tp -> Int
unTVar (TVar v) = v
unTVar _ = pmError "unTVar" "type is not a TVar"
data PatternElement = WildcardElement | InfiniteElement String | FiniteElement String deriving Eq
isInfiniteElement :: PatternElement -> Bool
isInfiniteElement (InfiniteElement _) = True
isInfiniteElement _ = False
elementString :: PatternElement -> String
elementString (InfiniteElement s) = s
elementString ( FiniteElement s) = s
elementString _ = []
listPat :: [[PatternElement]] -> [PatternElement]
listPat [] = [FiniteElement "[]"]
listPat (ps:pss) = FiniteElement ":" : ps ++ listPat pss
stringPat :: String -> [PatternElement]
stringPat [] = [FiniteElement "[]"]
stringPat (c:cs) = FiniteElement ":" : InfiniteElement [c] : stringPat cs
data PatternsMissing = PatternsMissing [(PatternElement, PatternsMissing)]
unMissing :: PatternsMissing -> [(PatternElement, PatternsMissing)]
unMissing (PatternsMissing l) = l
wildMissing :: Int -> PatternsMissing
wildMissing 0 = PatternsMissing []
wildMissing n = PatternsMissing [(WildcardElement, wildMissing $ n 1)]
missingList :: PatternsMissing -> [[PatternElement]]
missingList (PatternsMissing []) = [[]]
missingList (PatternsMissing [(d,t)]) = map (d:) $ missingList t
missingList (PatternsMissing (d:ds)) = (missingList $ PatternsMissing [d]) ++ (missingList $ PatternsMissing ds)
nicePattern :: Bool -> Env -> [PatternElement] -> [Pattern]
nicePattern b env = map (parensPattern b) . nice
where
nice :: [PatternElement] -> [Pattern]
nice [] = []
nice (WildcardElement :ps) = Pattern_Wildcard noRange : nice ps
nice (InfiniteElement _ :_) = pmError "nicePattern" "InfiniteElement in pattern!"
nice (FiniteElement con:ps) =
let rest = nice ps
name = nameFromString con
n = nrOfArguments env con
in case name
of Name_Identifier _ _ _ -> Pattern_Constructor noRange name (take n rest) : drop n rest
Name_Operator _ _ _ | con == ":" -> case head $ tail rest
of Pattern_List _ pats -> Pattern_List noRange (head rest:pats) : (tail $ tail rest)
_ -> Pattern_InfixConstructor noRange (head rest) name (head $ tail rest) : (tail $ tail rest)
| otherwise -> Pattern_InfixConstructor noRange (head rest) name (head $ tail rest) : (tail $ tail rest)
Name_Special _ _ _ | isTupleConstructor con -> Pattern_Tuple noRange (take n rest) : drop n rest
| con == "[]" -> Pattern_List noRange [] : rest
| otherwise -> Pattern_Constructor noRange name (take n rest) : drop n rest
parensPattern :: Bool -> Pattern -> Pattern
parensPattern b = if b then rap . par else fst . par
where
par :: Pattern -> (Pattern, Bool)
par p@(Pattern_Literal _ _ ) = (p, False)
par p@(Pattern_Variable _ _ ) = (p, False)
par (Pattern_Constructor r n ps ) = (Pattern_Constructor r n $ map (rap.par) ps, length ps > 0)
par (Pattern_Parenthesized _ p ) = par p
par (Pattern_InfixConstructor r l n k) = (Pattern_InfixConstructor r (rap $ par l) n (rap $ par k), True)
par (Pattern_List r ps ) = (Pattern_List r $ map (fst.par) ps, False)
par (Pattern_Tuple r ps ) = (Pattern_Tuple r $ map (fst.par) ps, False)
par (Pattern_Record _ _ _ ) = pmError "parensPattern" "Records are not supported"
par p@(Pattern_Negate _ _ ) = (p, True)
par p@(Pattern_NegateFloat _ _ ) = (p, True)
par (Pattern_As r n p ) = (Pattern_As r n (rap $ par p), False)
par p@(Pattern_Wildcard _ ) = (p, False)
par (Pattern_Irrefutable _ _ ) = pmError "parensPattern" "Irrefutable patterns are not supported"
par (Pattern_Successor _ _ _ ) = pmError "parensPattern" "Successors are not supported"
par (Pattern_Hole _ _ ) = error "not supported"
rap :: (Pattern, Bool) -> Pattern
rap (p, False) = p
rap (p, True ) = Pattern_Parenthesized noRange p
complement :: ImportEnvironment -> [Tp] -> [[PatternElement]] -> PatternsMissing
complement _ [] _ = PatternsMissing []
complement _ _ ([]:_) = PatternsMissing []
complement env (tp:tps) pss | null $ unMissing anyComplement = PatternsMissing []
| all (((== WildcardElement) |^| isInfiniteElement).head) pss = anyComplement
| otherwise = finComplement
where
patComplement :: [[PatternElement]] -> PatternElement -> [Tp] -> PatternsMissing
patComplement [] current typs = PatternsMissing [(current, wildMissing $ length typs)]
patComplement patss current typs = case unMissing $ complement env typs $ map tail $ patss
of [] -> PatternsMissing []
tegs -> PatternsMissing [(current, PatternsMissing tegs)]
anyComplement :: PatternsMissing
anyComplement = patComplement (filter ((== WildcardElement).head) pss) WildcardElement tps
conComplement :: (Name, [Tp]) -> PatternsMissing
conComplement (con, args) = patComplement ( filter ((== FiniteElement (getNameName con)).head) pss
++ map (\ps -> FiniteElement (getNameName con) : replicate (length args) WildcardElement ++ tail ps)
(filter ((== WildcardElement).head) pss)
)
(FiniteElement (getNameName con)) (args ++ tps)
finComplement :: PatternsMissing
finComplement = case constructors env tp
of [] -> wildMissing $ 1 + length tps
cons -> PatternsMissing $ concatMap (unMissing.conComplement) cons
unreachable :: ImportEnvironment -> [Tp] -> [([PatternElement], Int)] -> [Int]
unreachable env tps ps = let reach = reachable env tps ps
in filter (not . flip elem reach) (map snd ps)
reachable :: ImportEnvironment -> [Tp] -> [([PatternElement], Int)] -> [Int]
reachable _ [] _ = pmError "reachable" "empty type list!"
reachable env (tp:tps) ps
| all ((== WildcardElement).head.fst) ps = conReachable ps
| otherwise = concat $ map (conReachable.conPats) $ stop cons
where
cons :: [PatternElement]
cons = thin $ map (head.fst) ps
conPats :: PatternElement -> [([PatternElement], Int)]
conPats con = map (\(es, i) -> (fill con es, i)) $ filter (((== con) |^| (== WildcardElement)).head.fst) ps
fill :: PatternElement -> [PatternElement] -> [PatternElement]
fill e@(FiniteElement c) (WildcardElement : es) = e : replicate (nrOfArguments (importEnvironmentToEnv env) c) WildcardElement ++ es
fill e (_ : es) = e : es
fill _ [] = error "Pattern match failure in StaticAnalysis.Inferencers.reachable"
stop :: [PatternElement] -> [PatternElement]
stop es | length (constructors env tp) > length es = FiniteElement "[*]" : es
| length (constructors env tp) == 0 = FiniteElement "[*]" : es
| otherwise = es
conReachable :: [([PatternElement], Int)] -> [Int]
conReachable [] = []
conReachable pats
| null.tail.fst.head $ pats = [snd.head $ pats]
| otherwise = reachable env (arguments (elementString.head.fst.head $ pats) ++ tps)
$ map (\(es, i) -> (tail es, i)) pats
arguments :: String -> [Tp]
arguments c = maybe [] id $ lookup c $ map (\(n, typs) -> (getNameName n, typs)) $ constructors env tp
thin :: [PatternElement] -> [PatternElement]
thin [] = []
thin (WildcardElement : es) = thin es
thin (e : es) | elem e thines = thines
| otherwise = e : thines
where thines = thin es
data Inh_Alternative = Inh_Alternative { allPatterns_Inh_Alternative :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Alternative :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_Alternative :: (Predicates), betaLeft_Inh_Alternative :: (Tp), betaRight_Inh_Alternative :: (Tp), betaUnique_Inh_Alternative :: (Int), classEnvironment_Inh_Alternative :: (ClassEnvironment), collectErrors_Inh_Alternative :: (TypeErrors), collectWarnings_Inh_Alternative :: (Warnings), counter_Inh_Alternative :: (Int), currentChunk_Inh_Alternative :: (Int), dictionaryEnvironment_Inh_Alternative :: (DictionaryEnvironment), importEnvironment_Inh_Alternative :: (ImportEnvironment), matchIO_Inh_Alternative :: (IO ()), monos_Inh_Alternative :: (Monos), namesInScope_Inh_Alternative :: (Names), orderedTypeSynonyms_Inh_Alternative :: (OrderedTypeSynonyms), parentTree_Inh_Alternative :: (InfoTree), patternMatchWarnings_Inh_Alternative :: ([Warning]), substitution_Inh_Alternative :: (FixpointSubstitution), typeschemeMap_Inh_Alternative :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_Alternative :: (Int) }
data Syn_Alternative = Syn_Alternative { assumptions_Syn_Alternative :: (Assumptions), betaUnique_Syn_Alternative :: (Int), collectErrors_Syn_Alternative :: (TypeErrors), collectInstances_Syn_Alternative :: ([(Name, Instance)]), collectWarnings_Syn_Alternative :: (Warnings), constraints_Syn_Alternative :: (ConstraintSet), counter_Syn_Alternative :: (Int), dictionaryEnvironment_Syn_Alternative :: (DictionaryEnvironment), elements_Syn_Alternative :: ( ([PatternElement], Bool) ), infoTrees_Syn_Alternative :: (InfoTrees), matchIO_Syn_Alternative :: (IO ()), patternMatchWarnings_Syn_Alternative :: ([Warning]), self_Syn_Alternative :: (Alternative), unboundNames_Syn_Alternative :: (Names), uniqueChunk_Syn_Alternative :: (Int), unrwar_Syn_Alternative :: (Warning) }
wrap_Alternative :: T_Alternative -> Inh_Alternative -> (Syn_Alternative )
wrap_Alternative (T_Alternative act) (Inh_Alternative _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaLeft _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Alternative_vIn1 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaLeft _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk
(T_Alternative_vOut1 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar) <- return (inv_Alternative_s2 sem arg)
return (Syn_Alternative _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar)
)
sem_Alternative :: Alternative -> T_Alternative
sem_Alternative ( Alternative_Hole range_ id_ ) = sem_Alternative_Hole ( sem_Range range_ ) id_
sem_Alternative ( Alternative_Feedback range_ feedback_ alternative_ ) = sem_Alternative_Feedback ( sem_Range range_ ) feedback_ ( sem_Alternative alternative_ )
sem_Alternative ( Alternative_Alternative range_ pattern_ righthandside_ ) = sem_Alternative_Alternative ( sem_Range range_ ) ( sem_Pattern pattern_ ) ( sem_RightHandSide righthandside_ )
sem_Alternative ( Alternative_Empty range_ ) = sem_Alternative_Empty ( sem_Range range_ )
newtype T_Alternative = T_Alternative {
attach_T_Alternative :: Identity (T_Alternative_s2 )
}
newtype T_Alternative_s2 = C_Alternative_s2 {
inv_Alternative_s2 :: (T_Alternative_v1 )
}
data T_Alternative_s3 = C_Alternative_s3
type T_Alternative_v1 = (T_Alternative_vIn1 ) -> (T_Alternative_vOut1 )
data T_Alternative_vIn1 = T_Alternative_vIn1 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Tp) (Tp) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Int)
data T_Alternative_vOut1 = T_Alternative_vOut1 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) ( ([PatternElement], Bool) ) (InfoTrees) (IO ()) ([Warning]) (Alternative) (Names) (Int) (Warning)
sem_Alternative_Hole :: T_Range -> (Integer) -> T_Alternative
sem_Alternative_Hole arg_range_ arg_id_ = T_Alternative (return st2) where
st2 = let
v1 :: T_Alternative_v1
v1 = \ (T_Alternative_vIn1 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaLeft _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule0 ()
_constraints = rule1 ()
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2 ()
_lhsOelements :: ([PatternElement], Bool)
_lhsOelements = rule3 ()
_lhsOunrwar :: Warning
_lhsOunrwar = rule4 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule5 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule6 ()
_self = rule7 _rangeIself arg_id_
_lhsOself :: Alternative
_lhsOself = rule8 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule9 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule10 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule11 _lhsIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule12 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule13 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule14 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule15 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule16 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule17 _lhsIuniqueChunk
__result_ = T_Alternative_vOut1 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar
in __result_ )
in C_Alternative_s2 v1
rule0 = \ (_ :: ()) ->
noAssumptions
rule1 = \ (_ :: ()) ->
emptyTree
rule2 = \ (_ :: ()) ->
[]
rule3 = \ (_ :: ()) ->
([], False)
rule4 = \ (_ :: ()) ->
pmError "Alternative_Empty.unrwar" "empty alternative"
rule5 = \ (_ :: ()) ->
[]
rule6 = \ (_ :: ()) ->
[]
rule7 = \ ((_rangeIself) :: Range) id_ ->
Alternative_Hole _rangeIself id_
rule8 = \ _self ->
_self
rule9 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule10 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule11 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule12 = \ _constraints ->
_constraints
rule13 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule14 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule15 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule16 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule17 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Alternative_Feedback :: T_Range -> (String) -> T_Alternative -> T_Alternative
sem_Alternative_Feedback arg_range_ arg_feedback_ arg_alternative_ = T_Alternative (return st2) where
st2 = let
v1 :: T_Alternative_v1
v1 = \ (T_Alternative_vIn1 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaLeft _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_alternativeX2 = Control.Monad.Identity.runIdentity (attach_T_Alternative (arg_alternative_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Alternative_vOut1 _alternativeIassumptions _alternativeIbetaUnique _alternativeIcollectErrors _alternativeIcollectInstances _alternativeIcollectWarnings _alternativeIconstraints _alternativeIcounter _alternativeIdictionaryEnvironment _alternativeIelements _alternativeIinfoTrees _alternativeImatchIO _alternativeIpatternMatchWarnings _alternativeIself _alternativeIunboundNames _alternativeIuniqueChunk _alternativeIunrwar) = inv_Alternative_s2 _alternativeX2 (T_Alternative_vIn1 _alternativeOallPatterns _alternativeOallTypeSchemes _alternativeOavailablePredicates _alternativeObetaLeft _alternativeObetaRight _alternativeObetaUnique _alternativeOclassEnvironment _alternativeOcollectErrors _alternativeOcollectWarnings _alternativeOcounter _alternativeOcurrentChunk _alternativeOdictionaryEnvironment _alternativeOimportEnvironment _alternativeOmatchIO _alternativeOmonos _alternativeOnamesInScope _alternativeOorderedTypeSynonyms _alternativeOparentTree _alternativeOpatternMatchWarnings _alternativeOsubstitution _alternativeOtypeschemeMap _alternativeOuniqueChunk)
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule18 _alternativeIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule19 _alternativeIunboundNames
_self = rule20 _alternativeIself _rangeIself arg_feedback_
_lhsOself :: Alternative
_lhsOself = rule21 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule22 _alternativeIassumptions
_lhsObetaUnique :: Int
_lhsObetaUnique = rule23 _alternativeIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule24 _alternativeIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule25 _alternativeIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule26 _alternativeIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule27 _alternativeIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule28 _alternativeIdictionaryEnvironment
_lhsOelements :: ([PatternElement], Bool)
_lhsOelements = rule29 _alternativeIelements
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule30 _alternativeIinfoTrees
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule31 _alternativeImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule32 _alternativeIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule33 _alternativeIuniqueChunk
_lhsOunrwar :: Warning
_lhsOunrwar = rule34 _alternativeIunrwar
_alternativeOallPatterns = rule35 _lhsIallPatterns
_alternativeOallTypeSchemes = rule36 _lhsIallTypeSchemes
_alternativeOavailablePredicates = rule37 _lhsIavailablePredicates
_alternativeObetaLeft = rule38 _lhsIbetaLeft
_alternativeObetaRight = rule39 _lhsIbetaRight
_alternativeObetaUnique = rule40 _lhsIbetaUnique
_alternativeOclassEnvironment = rule41 _lhsIclassEnvironment
_alternativeOcollectErrors = rule42 _lhsIcollectErrors
_alternativeOcollectWarnings = rule43 _lhsIcollectWarnings
_alternativeOcounter = rule44 _lhsIcounter
_alternativeOcurrentChunk = rule45 _lhsIcurrentChunk
_alternativeOdictionaryEnvironment = rule46 _lhsIdictionaryEnvironment
_alternativeOimportEnvironment = rule47 _lhsIimportEnvironment
_alternativeOmatchIO = rule48 _lhsImatchIO
_alternativeOmonos = rule49 _lhsImonos
_alternativeOnamesInScope = rule50 _lhsInamesInScope
_alternativeOorderedTypeSynonyms = rule51 _lhsIorderedTypeSynonyms
_alternativeOparentTree = rule52 _lhsIparentTree
_alternativeOpatternMatchWarnings = rule53 _lhsIpatternMatchWarnings
_alternativeOsubstitution = rule54 _lhsIsubstitution
_alternativeOtypeschemeMap = rule55 _lhsItypeschemeMap
_alternativeOuniqueChunk = rule56 _lhsIuniqueChunk
__result_ = T_Alternative_vOut1 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar
in __result_ )
in C_Alternative_s2 v1
rule18 = \ ((_alternativeIcollectInstances) :: [(Name, Instance)]) ->
_alternativeIcollectInstances
rule19 = \ ((_alternativeIunboundNames) :: Names) ->
_alternativeIunboundNames
rule20 = \ ((_alternativeIself) :: Alternative) ((_rangeIself) :: Range) feedback_ ->
Alternative_Feedback _rangeIself feedback_ _alternativeIself
rule21 = \ _self ->
_self
rule22 = \ ((_alternativeIassumptions) :: Assumptions) ->
_alternativeIassumptions
rule23 = \ ((_alternativeIbetaUnique) :: Int) ->
_alternativeIbetaUnique
rule24 = \ ((_alternativeIcollectErrors) :: TypeErrors) ->
_alternativeIcollectErrors
rule25 = \ ((_alternativeIcollectWarnings) :: Warnings) ->
_alternativeIcollectWarnings
rule26 = \ ((_alternativeIconstraints) :: ConstraintSet) ->
_alternativeIconstraints
rule27 = \ ((_alternativeIcounter) :: Int) ->
_alternativeIcounter
rule28 = \ ((_alternativeIdictionaryEnvironment) :: DictionaryEnvironment) ->
_alternativeIdictionaryEnvironment
rule29 = \ ((_alternativeIelements) :: ([PatternElement], Bool) ) ->
_alternativeIelements
rule30 = \ ((_alternativeIinfoTrees) :: InfoTrees) ->
_alternativeIinfoTrees
rule31 = \ ((_alternativeImatchIO) :: IO ()) ->
_alternativeImatchIO
rule32 = \ ((_alternativeIpatternMatchWarnings) :: [Warning]) ->
_alternativeIpatternMatchWarnings
rule33 = \ ((_alternativeIuniqueChunk) :: Int) ->
_alternativeIuniqueChunk
rule34 = \ ((_alternativeIunrwar) :: Warning) ->
_alternativeIunrwar
rule35 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule36 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule37 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule38 = \ ((_lhsIbetaLeft) :: Tp) ->
_lhsIbetaLeft
rule39 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule40 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule41 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule42 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule43 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule44 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule45 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule46 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule47 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule48 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule49 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule50 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule51 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule52 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule53 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule54 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule55 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule56 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Alternative_Alternative :: T_Range -> T_Pattern -> T_RightHandSide -> T_Alternative
sem_Alternative_Alternative arg_range_ arg_pattern_ arg_righthandside_ = T_Alternative (return st2) where
st2 = let
v1 :: T_Alternative_v1
v1 = \ (T_Alternative_vIn1 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaLeft _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_patternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))
_righthandsideX149 = Control.Monad.Identity.runIdentity (attach_T_RightHandSide (arg_righthandside_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Pattern_vOut118 _patternIbeta _patternIbetaUnique _patternIconstraints _patternIcounter _patternIelements _patternIenvironment _patternIinfoTree _patternIpatVarNames _patternIpatternMatchWarnings _patternIself _patternIunboundNames) = inv_Pattern_s119 _patternX119 (T_Pattern_vIn118 _patternObetaUnique _patternOcounter _patternOimportEnvironment _patternOmonos _patternOnamesInScope _patternOparentTree _patternOpatternMatchWarnings)
(T_RightHandSide_vOut148 _righthandsideIassumptions _righthandsideIbetaUnique _righthandsideIcollectErrors _righthandsideIcollectInstances _righthandsideIcollectWarnings _righthandsideIconstraints _righthandsideIcounter _righthandsideIdictionaryEnvironment _righthandsideIfallthrough _righthandsideIinfoTree _righthandsideImatchIO _righthandsideIpatternMatchWarnings _righthandsideIself _righthandsideIunboundNames _righthandsideIuniqueChunk) = inv_RightHandSide_s149 _righthandsideX149 (T_RightHandSide_vIn148 _righthandsideOallPatterns _righthandsideOallTypeSchemes _righthandsideOavailablePredicates _righthandsideObetaRight _righthandsideObetaUnique _righthandsideOclassEnvironment _righthandsideOcollectErrors _righthandsideOcollectWarnings _righthandsideOcounter _righthandsideOcurrentChunk _righthandsideOdictionaryEnvironment _righthandsideOimportEnvironment _righthandsideOmatchIO _righthandsideOmonos _righthandsideOnamesInScope _righthandsideOorderedTypeSynonyms _righthandsideOparentTree _righthandsideOpatternMatchWarnings _righthandsideOsubstitution _righthandsideOtypeschemeMap _righthandsideOuniqueChunk)
_righthandsideOmonos = rule57 _csetBinds _lhsImonos _patternIenvironment
_constraints = rule58 _conLeft _csetBinds _patternIconstraints _righthandsideIconstraints
_conLeft = rule59 _cinfoLeft _lhsIbetaLeft _patternIbeta
_lhsOassumptions :: Assumptions
(_csetBinds,_lhsOassumptions) = rule60 _cinfoBind _patternIenvironment _righthandsideIassumptions
_cinfoLeft = rule61 _lhsIbetaLeft _lhsIparentTree _patternIinfoTree
_cinfoBind = rule62 _lhsIparentTree _patternIenvironment
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule63 _patternIinfoTree _righthandsideIinfoTree
(_namesInScope,_unboundNames,_scopeInfo) = rule64 _lhsInamesInScope _patternIpatVarNames _righthandsideIunboundNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule65 _unboundNames
_lhsOelements :: ([PatternElement], Bool)
_lhsOelements = rule66 _patternIelements _righthandsideIfallthrough
_lhsOunrwar :: Warning
_lhsOunrwar = rule67 _patternIself _rangeIself
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule68 _righthandsideIcollectInstances
_self = rule69 _patternIself _rangeIself _righthandsideIself
_lhsOself :: Alternative
_lhsOself = rule70 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule71 _righthandsideIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule72 _righthandsideIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule73 _righthandsideIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule74 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule75 _righthandsideIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule76 _righthandsideIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule77 _righthandsideImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule78 _righthandsideIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule79 _righthandsideIuniqueChunk
_patternObetaUnique = rule80 _lhsIbetaUnique
_patternOcounter = rule81 _lhsIcounter
_patternOimportEnvironment = rule82 _lhsIimportEnvironment
_patternOmonos = rule83 _lhsImonos
_patternOnamesInScope = rule84 _namesInScope
_patternOparentTree = rule85 _lhsIparentTree
_patternOpatternMatchWarnings = rule86 _lhsIpatternMatchWarnings
_righthandsideOallPatterns = rule87 _lhsIallPatterns
_righthandsideOallTypeSchemes = rule88 _lhsIallTypeSchemes
_righthandsideOavailablePredicates = rule89 _lhsIavailablePredicates
_righthandsideObetaRight = rule90 _lhsIbetaRight
_righthandsideObetaUnique = rule91 _patternIbetaUnique
_righthandsideOclassEnvironment = rule92 _lhsIclassEnvironment
_righthandsideOcollectErrors = rule93 _lhsIcollectErrors
_righthandsideOcollectWarnings = rule94 _lhsIcollectWarnings
_righthandsideOcounter = rule95 _patternIcounter
_righthandsideOcurrentChunk = rule96 _lhsIcurrentChunk
_righthandsideOdictionaryEnvironment = rule97 _lhsIdictionaryEnvironment
_righthandsideOimportEnvironment = rule98 _lhsIimportEnvironment
_righthandsideOmatchIO = rule99 _lhsImatchIO
_righthandsideOnamesInScope = rule100 _namesInScope
_righthandsideOorderedTypeSynonyms = rule101 _lhsIorderedTypeSynonyms
_righthandsideOparentTree = rule102 _lhsIparentTree
_righthandsideOpatternMatchWarnings = rule103 _patternIpatternMatchWarnings
_righthandsideOsubstitution = rule104 _lhsIsubstitution
_righthandsideOtypeschemeMap = rule105 _lhsItypeschemeMap
_righthandsideOuniqueChunk = rule106 _lhsIuniqueChunk
__result_ = T_Alternative_vOut1 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar
in __result_ )
in C_Alternative_s2 v1
rule57 = \ _csetBinds ((_lhsImonos) :: Monos) ((_patternIenvironment) :: PatternAssumptions) ->
M.elems _patternIenvironment ++ getMonos _csetBinds ++ _lhsImonos
rule58 = \ _conLeft _csetBinds ((_patternIconstraints) :: ConstraintSet) ((_righthandsideIconstraints) :: ConstraintSet) ->
_csetBinds .>>.
Node [ _conLeft .<. _patternIconstraints
, _righthandsideIconstraints
]
rule59 = \ _cinfoLeft ((_lhsIbetaLeft) :: Tp) ((_patternIbeta) :: Tp) ->
[ (_patternIbeta .==. _lhsIbetaLeft) _cinfoLeft ]
rule60 = \ _cinfoBind ((_patternIenvironment) :: PatternAssumptions) ((_righthandsideIassumptions) :: Assumptions) ->
(_patternIenvironment .===. _righthandsideIassumptions) _cinfoBind
rule61 = \ ((_lhsIbetaLeft) :: Tp) ((_lhsIparentTree) :: InfoTree) ((_patternIinfoTree) :: InfoTree) ->
resultConstraint "case pattern" _patternIinfoTree
[ Unifier (head (ftv _lhsIbetaLeft)) ("case patterns", attribute _lhsIparentTree, "case pattern") ]
rule62 = \ ((_lhsIparentTree) :: InfoTree) ((_patternIenvironment) :: PatternAssumptions) ->
\name -> variableConstraint "variable" (nameToUHA_Expr name)
[ FolkloreConstraint
, makeUnifier name "case alternative" _patternIenvironment _lhsIparentTree
]
rule63 = \ ((_patternIinfoTree) :: InfoTree) ((_righthandsideIinfoTree) :: InfoTree) ->
[_patternIinfoTree, _righthandsideIinfoTree]
rule64 = \ ((_lhsInamesInScope) :: Names) ((_patternIpatVarNames) :: Names) ((_righthandsideIunboundNames) :: Names) ->
changeOfScope _patternIpatVarNames _righthandsideIunboundNames _lhsInamesInScope
rule65 = \ _unboundNames ->
_unboundNames
rule66 = \ ((_patternIelements) :: [PatternElement] ) ((_righthandsideIfallthrough) :: Bool) ->
(_patternIelements, _righthandsideIfallthrough)
rule67 = \ ((_patternIself) :: Pattern) ((_rangeIself) :: Range) ->
UnreachablePatternCase _rangeIself _patternIself
rule68 = \ ((_righthandsideIcollectInstances) :: [(Name, Instance)]) ->
_righthandsideIcollectInstances
rule69 = \ ((_patternIself) :: Pattern) ((_rangeIself) :: Range) ((_righthandsideIself) :: RightHandSide) ->
Alternative_Alternative _rangeIself _patternIself _righthandsideIself
rule70 = \ _self ->
_self
rule71 = \ ((_righthandsideIbetaUnique) :: Int) ->
_righthandsideIbetaUnique
rule72 = \ ((_righthandsideIcollectErrors) :: TypeErrors) ->
_righthandsideIcollectErrors
rule73 = \ ((_righthandsideIcollectWarnings) :: Warnings) ->
_righthandsideIcollectWarnings
rule74 = \ _constraints ->
_constraints
rule75 = \ ((_righthandsideIcounter) :: Int) ->
_righthandsideIcounter
rule76 = \ ((_righthandsideIdictionaryEnvironment) :: DictionaryEnvironment) ->
_righthandsideIdictionaryEnvironment
rule77 = \ ((_righthandsideImatchIO) :: IO ()) ->
_righthandsideImatchIO
rule78 = \ ((_righthandsideIpatternMatchWarnings) :: [Warning]) ->
_righthandsideIpatternMatchWarnings
rule79 = \ ((_righthandsideIuniqueChunk) :: Int) ->
_righthandsideIuniqueChunk
rule80 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule81 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule82 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule83 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule84 = \ _namesInScope ->
_namesInScope
rule85 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule86 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule87 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule88 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule89 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule90 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule91 = \ ((_patternIbetaUnique) :: Int) ->
_patternIbetaUnique
rule92 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule93 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule94 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule95 = \ ((_patternIcounter) :: Int) ->
_patternIcounter
rule96 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule97 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule98 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule99 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule100 = \ _namesInScope ->
_namesInScope
rule101 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule102 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule103 = \ ((_patternIpatternMatchWarnings) :: [Warning]) ->
_patternIpatternMatchWarnings
rule104 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule105 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule106 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Alternative_Empty :: T_Range -> T_Alternative
sem_Alternative_Empty arg_range_ = T_Alternative (return st2) where
st2 = let
v1 :: T_Alternative_v1
v1 = \ (T_Alternative_vIn1 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaLeft _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule107 ()
_constraints = rule108 ()
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule109 ()
_lhsOelements :: ([PatternElement], Bool)
_lhsOelements = rule110 ()
_lhsOunrwar :: Warning
_lhsOunrwar = rule111 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule112 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule113 ()
_self = rule114 _rangeIself
_lhsOself :: Alternative
_lhsOself = rule115 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule116 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule117 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule118 _lhsIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule119 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule120 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule121 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule122 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule123 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule124 _lhsIuniqueChunk
__result_ = T_Alternative_vOut1 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar
in __result_ )
in C_Alternative_s2 v1
rule107 = \ (_ :: ()) ->
noAssumptions
rule108 = \ (_ :: ()) ->
emptyTree
rule109 = \ (_ :: ()) ->
[]
rule110 = \ (_ :: ()) ->
([], False)
rule111 = \ (_ :: ()) ->
pmError "Alternative_Empty.unrwar" "empty alternative"
rule112 = \ (_ :: ()) ->
[]
rule113 = \ (_ :: ()) ->
[]
rule114 = \ ((_rangeIself) :: Range) ->
Alternative_Empty _rangeIself
rule115 = \ _self ->
_self
rule116 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule117 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule118 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule119 = \ _constraints ->
_constraints
rule120 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule121 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule122 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule123 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule124 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
data Inh_Alternatives = Inh_Alternatives { allPatterns_Inh_Alternatives :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Alternatives :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_Alternatives :: (Predicates), betaLeft_Inh_Alternatives :: (Tp), betaRight_Inh_Alternatives :: (Tp), betaUnique_Inh_Alternatives :: (Int), classEnvironment_Inh_Alternatives :: (ClassEnvironment), collectErrors_Inh_Alternatives :: (TypeErrors), collectWarnings_Inh_Alternatives :: (Warnings), counter_Inh_Alternatives :: (Int), currentChunk_Inh_Alternatives :: (Int), dictionaryEnvironment_Inh_Alternatives :: (DictionaryEnvironment), importEnvironment_Inh_Alternatives :: (ImportEnvironment), matchIO_Inh_Alternatives :: (IO ()), monos_Inh_Alternatives :: (Monos), namesInScope_Inh_Alternatives :: (Names), orderedTypeSynonyms_Inh_Alternatives :: (OrderedTypeSynonyms), parentTree_Inh_Alternatives :: (InfoTree), patternMatchWarnings_Inh_Alternatives :: ([Warning]), substitution_Inh_Alternatives :: (FixpointSubstitution), typeschemeMap_Inh_Alternatives :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_Alternatives :: (Int) }
data Syn_Alternatives = Syn_Alternatives { assumptions_Syn_Alternatives :: (Assumptions), betaUnique_Syn_Alternatives :: (Int), collectErrors_Syn_Alternatives :: (TypeErrors), collectInstances_Syn_Alternatives :: ([(Name, Instance)]), collectWarnings_Syn_Alternatives :: (Warnings), constraintslist_Syn_Alternatives :: (ConstraintSets), counter_Syn_Alternatives :: (Int), dictionaryEnvironment_Syn_Alternatives :: (DictionaryEnvironment), elementss_Syn_Alternatives :: ([([PatternElement], Bool)]), infoTrees_Syn_Alternatives :: (InfoTrees), matchIO_Syn_Alternatives :: (IO ()), patternMatchWarnings_Syn_Alternatives :: ([Warning]), self_Syn_Alternatives :: (Alternatives), unboundNames_Syn_Alternatives :: (Names), uniqueChunk_Syn_Alternatives :: (Int), unrwars_Syn_Alternatives :: ([Warning]) }
wrap_Alternatives :: T_Alternatives -> Inh_Alternatives -> (Syn_Alternatives )
wrap_Alternatives (T_Alternatives act) (Inh_Alternatives _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaLeft _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Alternatives_vIn4 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaLeft _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk
(T_Alternatives_vOut4 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOelementss _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwars) <- return (inv_Alternatives_s5 sem arg)
return (Syn_Alternatives _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOelementss _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwars)
)
sem_Alternatives :: Alternatives -> T_Alternatives
sem_Alternatives list = Prelude.foldr sem_Alternatives_Cons sem_Alternatives_Nil (Prelude.map sem_Alternative list)
newtype T_Alternatives = T_Alternatives {
attach_T_Alternatives :: Identity (T_Alternatives_s5 )
}
newtype T_Alternatives_s5 = C_Alternatives_s5 {
inv_Alternatives_s5 :: (T_Alternatives_v4 )
}
data T_Alternatives_s6 = C_Alternatives_s6
type T_Alternatives_v4 = (T_Alternatives_vIn4 ) -> (T_Alternatives_vOut4 )
data T_Alternatives_vIn4 = T_Alternatives_vIn4 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Tp) (Tp) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Int)
data T_Alternatives_vOut4 = T_Alternatives_vOut4 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSets) (Int) (DictionaryEnvironment) ([([PatternElement], Bool)]) (InfoTrees) (IO ()) ([Warning]) (Alternatives) (Names) (Int) ([Warning])
sem_Alternatives_Cons :: T_Alternative -> T_Alternatives -> T_Alternatives
sem_Alternatives_Cons arg_hd_ arg_tl_ = T_Alternatives (return st5) where
st5 = let
v4 :: T_Alternatives_v4
v4 = \ (T_Alternatives_vIn4 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaLeft _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_hdX2 = Control.Monad.Identity.runIdentity (attach_T_Alternative (arg_hd_))
_tlX5 = Control.Monad.Identity.runIdentity (attach_T_Alternatives (arg_tl_))
(T_Alternative_vOut1 _hdIassumptions _hdIbetaUnique _hdIcollectErrors _hdIcollectInstances _hdIcollectWarnings _hdIconstraints _hdIcounter _hdIdictionaryEnvironment _hdIelements _hdIinfoTrees _hdImatchIO _hdIpatternMatchWarnings _hdIself _hdIunboundNames _hdIuniqueChunk _hdIunrwar) = inv_Alternative_s2 _hdX2 (T_Alternative_vIn1 _hdOallPatterns _hdOallTypeSchemes _hdOavailablePredicates _hdObetaLeft _hdObetaRight _hdObetaUnique _hdOclassEnvironment _hdOcollectErrors _hdOcollectWarnings _hdOcounter _hdOcurrentChunk _hdOdictionaryEnvironment _hdOimportEnvironment _hdOmatchIO _hdOmonos _hdOnamesInScope _hdOorderedTypeSynonyms _hdOparentTree _hdOpatternMatchWarnings _hdOsubstitution _hdOtypeschemeMap _hdOuniqueChunk)
(T_Alternatives_vOut4 _tlIassumptions _tlIbetaUnique _tlIcollectErrors _tlIcollectInstances _tlIcollectWarnings _tlIconstraintslist _tlIcounter _tlIdictionaryEnvironment _tlIelementss _tlIinfoTrees _tlImatchIO _tlIpatternMatchWarnings _tlIself _tlIunboundNames _tlIuniqueChunk _tlIunrwars) = inv_Alternatives_s5 _tlX5 (T_Alternatives_vIn4 _tlOallPatterns _tlOallTypeSchemes _tlOavailablePredicates _tlObetaLeft _tlObetaRight _tlObetaUnique _tlOclassEnvironment _tlOcollectErrors _tlOcollectWarnings _tlOcounter _tlOcurrentChunk _tlOdictionaryEnvironment _tlOimportEnvironment _tlOmatchIO _tlOmonos _tlOnamesInScope _tlOorderedTypeSynonyms _tlOparentTree _tlOpatternMatchWarnings _tlOsubstitution _tlOtypeschemeMap _tlOuniqueChunk)
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule125 _hdIassumptions _tlIassumptions
_lhsOconstraintslist :: ConstraintSets
_lhsOconstraintslist = rule126 _hdIconstraints _tlIconstraintslist
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule127 _hdIinfoTrees _tlIinfoTrees
_lhsOelementss :: [([PatternElement], Bool)]
_lhsOelementss = rule128 _hdIelements _tlIelementss
_lhsOunrwars :: [Warning]
_lhsOunrwars = rule129 _hdIunrwar _tlIunrwars
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule130 _hdIcollectInstances _tlIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule131 _hdIunboundNames _tlIunboundNames
_self = rule132 _hdIself _tlIself
_lhsOself :: Alternatives
_lhsOself = rule133 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule134 _tlIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule135 _tlIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule136 _tlIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule137 _tlIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule138 _tlIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule139 _tlImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule140 _tlIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule141 _tlIuniqueChunk
_hdOallPatterns = rule142 _lhsIallPatterns
_hdOallTypeSchemes = rule143 _lhsIallTypeSchemes
_hdOavailablePredicates = rule144 _lhsIavailablePredicates
_hdObetaLeft = rule145 _lhsIbetaLeft
_hdObetaRight = rule146 _lhsIbetaRight
_hdObetaUnique = rule147 _lhsIbetaUnique
_hdOclassEnvironment = rule148 _lhsIclassEnvironment
_hdOcollectErrors = rule149 _lhsIcollectErrors
_hdOcollectWarnings = rule150 _lhsIcollectWarnings
_hdOcounter = rule151 _lhsIcounter
_hdOcurrentChunk = rule152 _lhsIcurrentChunk
_hdOdictionaryEnvironment = rule153 _lhsIdictionaryEnvironment
_hdOimportEnvironment = rule154 _lhsIimportEnvironment
_hdOmatchIO = rule155 _lhsImatchIO
_hdOmonos = rule156 _lhsImonos
_hdOnamesInScope = rule157 _lhsInamesInScope
_hdOorderedTypeSynonyms = rule158 _lhsIorderedTypeSynonyms
_hdOparentTree = rule159 _lhsIparentTree
_hdOpatternMatchWarnings = rule160 _lhsIpatternMatchWarnings
_hdOsubstitution = rule161 _lhsIsubstitution
_hdOtypeschemeMap = rule162 _lhsItypeschemeMap
_hdOuniqueChunk = rule163 _lhsIuniqueChunk
_tlOallPatterns = rule164 _lhsIallPatterns
_tlOallTypeSchemes = rule165 _lhsIallTypeSchemes
_tlOavailablePredicates = rule166 _lhsIavailablePredicates
_tlObetaLeft = rule167 _lhsIbetaLeft
_tlObetaRight = rule168 _lhsIbetaRight
_tlObetaUnique = rule169 _hdIbetaUnique
_tlOclassEnvironment = rule170 _lhsIclassEnvironment
_tlOcollectErrors = rule171 _hdIcollectErrors
_tlOcollectWarnings = rule172 _hdIcollectWarnings
_tlOcounter = rule173 _hdIcounter
_tlOcurrentChunk = rule174 _lhsIcurrentChunk
_tlOdictionaryEnvironment = rule175 _hdIdictionaryEnvironment
_tlOimportEnvironment = rule176 _lhsIimportEnvironment
_tlOmatchIO = rule177 _hdImatchIO
_tlOmonos = rule178 _lhsImonos
_tlOnamesInScope = rule179 _lhsInamesInScope
_tlOorderedTypeSynonyms = rule180 _lhsIorderedTypeSynonyms
_tlOparentTree = rule181 _lhsIparentTree
_tlOpatternMatchWarnings = rule182 _hdIpatternMatchWarnings
_tlOsubstitution = rule183 _lhsIsubstitution
_tlOtypeschemeMap = rule184 _lhsItypeschemeMap
_tlOuniqueChunk = rule185 _hdIuniqueChunk
__result_ = T_Alternatives_vOut4 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOelementss _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwars
in __result_ )
in C_Alternatives_s5 v4
rule125 = \ ((_hdIassumptions) :: Assumptions) ((_tlIassumptions) :: Assumptions) ->
_hdIassumptions `combine` _tlIassumptions
rule126 = \ ((_hdIconstraints) :: ConstraintSet) ((_tlIconstraintslist) :: ConstraintSets) ->
_hdIconstraints : _tlIconstraintslist
rule127 = \ ((_hdIinfoTrees) :: InfoTrees) ((_tlIinfoTrees) :: InfoTrees) ->
_hdIinfoTrees ++ _tlIinfoTrees
rule128 = \ ((_hdIelements) :: ([PatternElement], Bool) ) ((_tlIelementss) :: [([PatternElement], Bool)]) ->
_hdIelements : _tlIelementss
rule129 = \ ((_hdIunrwar) :: Warning) ((_tlIunrwars) :: [Warning]) ->
_hdIunrwar : _tlIunrwars
rule130 = \ ((_hdIcollectInstances) :: [(Name, Instance)]) ((_tlIcollectInstances) :: [(Name, Instance)]) ->
_hdIcollectInstances ++ _tlIcollectInstances
rule131 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule132 = \ ((_hdIself) :: Alternative) ((_tlIself) :: Alternatives) ->
(:) _hdIself _tlIself
rule133 = \ _self ->
_self
rule134 = \ ((_tlIbetaUnique) :: Int) ->
_tlIbetaUnique
rule135 = \ ((_tlIcollectErrors) :: TypeErrors) ->
_tlIcollectErrors
rule136 = \ ((_tlIcollectWarnings) :: Warnings) ->
_tlIcollectWarnings
rule137 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule138 = \ ((_tlIdictionaryEnvironment) :: DictionaryEnvironment) ->
_tlIdictionaryEnvironment
rule139 = \ ((_tlImatchIO) :: IO ()) ->
_tlImatchIO
rule140 = \ ((_tlIpatternMatchWarnings) :: [Warning]) ->
_tlIpatternMatchWarnings
rule141 = \ ((_tlIuniqueChunk) :: Int) ->
_tlIuniqueChunk
rule142 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule143 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule144 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule145 = \ ((_lhsIbetaLeft) :: Tp) ->
_lhsIbetaLeft
rule146 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule147 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule148 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule149 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule150 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule151 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule152 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule153 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule154 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule155 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule156 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule157 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule158 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule159 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule160 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule161 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule162 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule163 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule164 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule165 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule166 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule167 = \ ((_lhsIbetaLeft) :: Tp) ->
_lhsIbetaLeft
rule168 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule169 = \ ((_hdIbetaUnique) :: Int) ->
_hdIbetaUnique
rule170 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule171 = \ ((_hdIcollectErrors) :: TypeErrors) ->
_hdIcollectErrors
rule172 = \ ((_hdIcollectWarnings) :: Warnings) ->
_hdIcollectWarnings
rule173 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule174 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule175 = \ ((_hdIdictionaryEnvironment) :: DictionaryEnvironment) ->
_hdIdictionaryEnvironment
rule176 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule177 = \ ((_hdImatchIO) :: IO ()) ->
_hdImatchIO
rule178 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule179 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule180 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule181 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule182 = \ ((_hdIpatternMatchWarnings) :: [Warning]) ->
_hdIpatternMatchWarnings
rule183 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule184 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule185 = \ ((_hdIuniqueChunk) :: Int) ->
_hdIuniqueChunk
sem_Alternatives_Nil :: T_Alternatives
sem_Alternatives_Nil = T_Alternatives (return st5) where
st5 = let
v4 :: T_Alternatives_v4
v4 = \ (T_Alternatives_vIn4 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaLeft _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule186 ()
_lhsOconstraintslist :: ConstraintSets
_lhsOconstraintslist = rule187 ()
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule188 ()
_lhsOelementss :: [([PatternElement], Bool)]
_lhsOelementss = rule189 ()
_lhsOunrwars :: [Warning]
_lhsOunrwars = rule190 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule191 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule192 ()
_self = rule193 ()
_lhsOself :: Alternatives
_lhsOself = rule194 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule195 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule196 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule197 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule198 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule199 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule200 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule201 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule202 _lhsIuniqueChunk
__result_ = T_Alternatives_vOut4 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOelementss _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwars
in __result_ )
in C_Alternatives_s5 v4
rule186 = \ (_ :: ()) ->
noAssumptions
rule187 = \ (_ :: ()) ->
[]
rule188 = \ (_ :: ()) ->
[]
rule189 = \ (_ :: ()) ->
[]
rule190 = \ (_ :: ()) ->
[]
rule191 = \ (_ :: ()) ->
[]
rule192 = \ (_ :: ()) ->
[]
rule193 = \ (_ :: ()) ->
[]
rule194 = \ _self ->
_self
rule195 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule196 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule197 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule198 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule199 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule200 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule201 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule202 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
data Inh_AnnotatedType = Inh_AnnotatedType { counter_Inh_AnnotatedType :: (Int), namesInScope_Inh_AnnotatedType :: (Names) }
data Syn_AnnotatedType = Syn_AnnotatedType { counter_Syn_AnnotatedType :: (Int), self_Syn_AnnotatedType :: (AnnotatedType), unboundNames_Syn_AnnotatedType :: (Names) }
wrap_AnnotatedType :: T_AnnotatedType -> Inh_AnnotatedType -> (Syn_AnnotatedType )
wrap_AnnotatedType (T_AnnotatedType act) (Inh_AnnotatedType _lhsIcounter _lhsInamesInScope) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_AnnotatedType_vIn7 _lhsIcounter _lhsInamesInScope
(T_AnnotatedType_vOut7 _lhsOcounter _lhsOself _lhsOunboundNames) <- return (inv_AnnotatedType_s8 sem arg)
return (Syn_AnnotatedType _lhsOcounter _lhsOself _lhsOunboundNames)
)
sem_AnnotatedType :: AnnotatedType -> T_AnnotatedType
sem_AnnotatedType ( AnnotatedType_AnnotatedType range_ strict_ type_ ) = sem_AnnotatedType_AnnotatedType ( sem_Range range_ ) strict_ ( sem_Type type_ )
newtype T_AnnotatedType = T_AnnotatedType {
attach_T_AnnotatedType :: Identity (T_AnnotatedType_s8 )
}
newtype T_AnnotatedType_s8 = C_AnnotatedType_s8 {
inv_AnnotatedType_s8 :: (T_AnnotatedType_v7 )
}
data T_AnnotatedType_s9 = C_AnnotatedType_s9
type T_AnnotatedType_v7 = (T_AnnotatedType_vIn7 ) -> (T_AnnotatedType_vOut7 )
data T_AnnotatedType_vIn7 = T_AnnotatedType_vIn7 (Int) (Names)
data T_AnnotatedType_vOut7 = T_AnnotatedType_vOut7 (Int) (AnnotatedType) (Names)
sem_AnnotatedType_AnnotatedType :: T_Range -> (Bool) -> T_Type -> T_AnnotatedType
sem_AnnotatedType_AnnotatedType arg_range_ arg_strict_ arg_type_ = T_AnnotatedType (return st8) where
st8 = let
v7 :: T_AnnotatedType_v7
v7 = \ (T_AnnotatedType_vIn7 _lhsIcounter _lhsInamesInScope) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_typeX164 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_type_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Type_vOut163 _typeIself) = inv_Type_s164 _typeX164 (T_Type_vIn163 )
_lhsOunboundNames :: Names
_lhsOunboundNames = rule203 ()
_self = rule204 _rangeIself _typeIself arg_strict_
_lhsOself :: AnnotatedType
_lhsOself = rule205 _self
_lhsOcounter :: Int
_lhsOcounter = rule206 _lhsIcounter
__result_ = T_AnnotatedType_vOut7 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_AnnotatedType_s8 v7
rule203 = \ (_ :: ()) ->
[]
rule204 = \ ((_rangeIself) :: Range) ((_typeIself) :: Type) strict_ ->
AnnotatedType_AnnotatedType _rangeIself strict_ _typeIself
rule205 = \ _self ->
_self
rule206 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
data Inh_AnnotatedTypes = Inh_AnnotatedTypes { counter_Inh_AnnotatedTypes :: (Int), namesInScope_Inh_AnnotatedTypes :: (Names) }
data Syn_AnnotatedTypes = Syn_AnnotatedTypes { counter_Syn_AnnotatedTypes :: (Int), self_Syn_AnnotatedTypes :: (AnnotatedTypes), unboundNames_Syn_AnnotatedTypes :: (Names) }
wrap_AnnotatedTypes :: T_AnnotatedTypes -> Inh_AnnotatedTypes -> (Syn_AnnotatedTypes )
wrap_AnnotatedTypes (T_AnnotatedTypes act) (Inh_AnnotatedTypes _lhsIcounter _lhsInamesInScope) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_AnnotatedTypes_vIn10 _lhsIcounter _lhsInamesInScope
(T_AnnotatedTypes_vOut10 _lhsOcounter _lhsOself _lhsOunboundNames) <- return (inv_AnnotatedTypes_s11 sem arg)
return (Syn_AnnotatedTypes _lhsOcounter _lhsOself _lhsOunboundNames)
)
sem_AnnotatedTypes :: AnnotatedTypes -> T_AnnotatedTypes
sem_AnnotatedTypes list = Prelude.foldr sem_AnnotatedTypes_Cons sem_AnnotatedTypes_Nil (Prelude.map sem_AnnotatedType list)
newtype T_AnnotatedTypes = T_AnnotatedTypes {
attach_T_AnnotatedTypes :: Identity (T_AnnotatedTypes_s11 )
}
newtype T_AnnotatedTypes_s11 = C_AnnotatedTypes_s11 {
inv_AnnotatedTypes_s11 :: (T_AnnotatedTypes_v10 )
}
data T_AnnotatedTypes_s12 = C_AnnotatedTypes_s12
type T_AnnotatedTypes_v10 = (T_AnnotatedTypes_vIn10 ) -> (T_AnnotatedTypes_vOut10 )
data T_AnnotatedTypes_vIn10 = T_AnnotatedTypes_vIn10 (Int) (Names)
data T_AnnotatedTypes_vOut10 = T_AnnotatedTypes_vOut10 (Int) (AnnotatedTypes) (Names)
sem_AnnotatedTypes_Cons :: T_AnnotatedType -> T_AnnotatedTypes -> T_AnnotatedTypes
sem_AnnotatedTypes_Cons arg_hd_ arg_tl_ = T_AnnotatedTypes (return st11) where
st11 = let
v10 :: T_AnnotatedTypes_v10
v10 = \ (T_AnnotatedTypes_vIn10 _lhsIcounter _lhsInamesInScope) -> ( let
_hdX8 = Control.Monad.Identity.runIdentity (attach_T_AnnotatedType (arg_hd_))
_tlX11 = Control.Monad.Identity.runIdentity (attach_T_AnnotatedTypes (arg_tl_))
(T_AnnotatedType_vOut7 _hdIcounter _hdIself _hdIunboundNames) = inv_AnnotatedType_s8 _hdX8 (T_AnnotatedType_vIn7 _hdOcounter _hdOnamesInScope)
(T_AnnotatedTypes_vOut10 _tlIcounter _tlIself _tlIunboundNames) = inv_AnnotatedTypes_s11 _tlX11 (T_AnnotatedTypes_vIn10 _tlOcounter _tlOnamesInScope)
_lhsOunboundNames :: Names
_lhsOunboundNames = rule207 _hdIunboundNames _tlIunboundNames
_self = rule208 _hdIself _tlIself
_lhsOself :: AnnotatedTypes
_lhsOself = rule209 _self
_lhsOcounter :: Int
_lhsOcounter = rule210 _tlIcounter
_hdOcounter = rule211 _lhsIcounter
_hdOnamesInScope = rule212 _lhsInamesInScope
_tlOcounter = rule213 _hdIcounter
_tlOnamesInScope = rule214 _lhsInamesInScope
__result_ = T_AnnotatedTypes_vOut10 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_AnnotatedTypes_s11 v10
rule207 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule208 = \ ((_hdIself) :: AnnotatedType) ((_tlIself) :: AnnotatedTypes) ->
(:) _hdIself _tlIself
rule209 = \ _self ->
_self
rule210 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule211 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule212 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule213 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule214 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
sem_AnnotatedTypes_Nil :: T_AnnotatedTypes
sem_AnnotatedTypes_Nil = T_AnnotatedTypes (return st11) where
st11 = let
v10 :: T_AnnotatedTypes_v10
v10 = \ (T_AnnotatedTypes_vIn10 _lhsIcounter _lhsInamesInScope) -> ( let
_lhsOunboundNames :: Names
_lhsOunboundNames = rule215 ()
_self = rule216 ()
_lhsOself :: AnnotatedTypes
_lhsOself = rule217 _self
_lhsOcounter :: Int
_lhsOcounter = rule218 _lhsIcounter
__result_ = T_AnnotatedTypes_vOut10 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_AnnotatedTypes_s11 v10
rule215 = \ (_ :: ()) ->
[]
rule216 = \ (_ :: ()) ->
[]
rule217 = \ _self ->
_self
rule218 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
data Inh_Body = Inh_Body { allPatterns_Inh_Body :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Body :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_Body :: (Predicates), betaUnique_Inh_Body :: (Int), classEnvironment_Inh_Body :: (ClassEnvironment), collectErrors_Inh_Body :: (TypeErrors), collectWarnings_Inh_Body :: (Warnings), counter_Inh_Body :: (Int), currentChunk_Inh_Body :: (Int), dictionaryEnvironment_Inh_Body :: (DictionaryEnvironment), importEnvironment_Inh_Body :: (ImportEnvironment), matchIO_Inh_Body :: (IO ()), monos_Inh_Body :: (Monos), namesInScope_Inh_Body :: (Names), orderedTypeSynonyms_Inh_Body :: (OrderedTypeSynonyms), patternMatchWarnings_Inh_Body :: ([Warning]), substitution_Inh_Body :: (FixpointSubstitution), typeschemeMap_Inh_Body :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_Body :: (Int) }
data Syn_Body = Syn_Body { assumptions_Syn_Body :: (Assumptions), betaUnique_Syn_Body :: (Int), collectErrors_Syn_Body :: (TypeErrors), collectInstances_Syn_Body :: ([(Name, Instance)]), collectWarnings_Syn_Body :: (Warnings), constraints_Syn_Body :: (ConstraintSet), counter_Syn_Body :: (Int), declVarNames_Syn_Body :: (Names), dictionaryEnvironment_Syn_Body :: (DictionaryEnvironment), infoTree_Syn_Body :: (InfoTree), matchIO_Syn_Body :: (IO ()), patternMatchWarnings_Syn_Body :: ([Warning]), self_Syn_Body :: (Body), toplevelTypes_Syn_Body :: (TypeEnvironment), unboundNames_Syn_Body :: (Names), uniqueChunk_Syn_Body :: (Int) }
wrap_Body :: T_Body -> Inh_Body -> (Syn_Body )
wrap_Body (T_Body act) (Inh_Body _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Body_vIn13 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk
(T_Body_vOut13 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOtoplevelTypes _lhsOunboundNames _lhsOuniqueChunk) <- return (inv_Body_s14 sem arg)
return (Syn_Body _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOtoplevelTypes _lhsOunboundNames _lhsOuniqueChunk)
)
sem_Body :: Body -> T_Body
sem_Body ( Body_Hole range_ id_ ) = sem_Body_Hole ( sem_Range range_ ) id_
sem_Body ( Body_Body range_ importdeclarations_ declarations_ ) = sem_Body_Body ( sem_Range range_ ) ( sem_ImportDeclarations importdeclarations_ ) ( sem_Declarations declarations_ )
newtype T_Body = T_Body {
attach_T_Body :: Identity (T_Body_s14 )
}
newtype T_Body_s14 = C_Body_s14 {
inv_Body_s14 :: (T_Body_v13 )
}
data T_Body_s15 = C_Body_s15
type T_Body_v13 = (T_Body_vIn13 ) -> (T_Body_vOut13 )
data T_Body_vIn13 = T_Body_vIn13 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Int)
data T_Body_vOut13 = T_Body_vOut13 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (Names) (DictionaryEnvironment) (InfoTree) (IO ()) ([Warning]) (Body) (TypeEnvironment) (Names) (Int)
sem_Body_Hole :: T_Range -> (Integer) -> T_Body
sem_Body_Hole arg_range_ arg_id_ = T_Body (return st14) where
st14 = let
v13 :: T_Body_v13
v13 = \ (T_Body_vIn13 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule219 ()
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule220 ()
_lhsOtoplevelTypes :: TypeEnvironment
_lhsOtoplevelTypes = rule221 ()
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule222 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule223 ()
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule224 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule225 ()
_self = rule226 _rangeIself arg_id_
_lhsOself :: Body
_lhsOself = rule227 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule228 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule229 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule230 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule231 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule232 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule233 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule234 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule235 _lhsIuniqueChunk
__result_ = T_Body_vOut13 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOtoplevelTypes _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Body_s14 v13
rule219 = \ (_ :: ()) ->
noAssumptions
rule220 = \ (_ :: ()) ->
emptyTree
rule221 = \ (_ :: ()) ->
M.empty
rule222 = \ (_ :: ()) ->
root (LocalInfo {self = UHA_Decls [], assignedType = Nothing, monos = []}) []
rule223 = \ (_ :: ()) ->
[]
rule224 = \ (_ :: ()) ->
[]
rule225 = \ (_ :: ()) ->
[]
rule226 = \ ((_rangeIself) :: Range) id_ ->
Body_Hole _rangeIself id_
rule227 = \ _self ->
_self
rule228 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule229 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule230 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule231 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule232 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule233 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule234 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule235 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Body_Body :: T_Range -> T_ImportDeclarations -> T_Declarations -> T_Body
sem_Body_Body arg_range_ arg_importdeclarations_ arg_declarations_ = T_Body (return st14) where
st14 = let
v13 :: T_Body_v13
v13 = \ (T_Body_vIn13 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_importdeclarationsX74 = Control.Monad.Identity.runIdentity (attach_T_ImportDeclarations (arg_importdeclarations_))
_declarationsX32 = Control.Monad.Identity.runIdentity (attach_T_Declarations (arg_declarations_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_ImportDeclarations_vOut73 _importdeclarationsIself) = inv_ImportDeclarations_s74 _importdeclarationsX74 (T_ImportDeclarations_vIn73 )
(T_Declarations_vOut31 _declarationsIbetaUnique _declarationsIbindingGroups _declarationsIcollectErrors _declarationsIcollectInstances _declarationsIcollectWarnings _declarationsIcounter _declarationsIdeclVarNames _declarationsIdictionaryEnvironment _declarationsIinfoTrees _declarationsImatchIO _declarationsIpatternMatchWarnings _declarationsIrestrictedNames _declarationsIself _declarationsIsimplePatNames _declarationsItypeSignatures _declarationsIunboundNames _declarationsIuniqueChunk) = inv_Declarations_s32 _declarationsX32 (T_Declarations_vIn31 _declarationsOallPatterns _declarationsOallTypeSchemes _declarationsOavailablePredicates _declarationsObetaUnique _declarationsObindingGroups _declarationsOclassEnvironment _declarationsOcollectErrors _declarationsOcollectWarnings _declarationsOcounter _declarationsOcurrentChunk _declarationsOdictionaryEnvironment _declarationsOimportEnvironment _declarationsOinheritedBDG _declarationsOmatchIO _declarationsOmonos _declarationsOnamesInScope _declarationsOorderedTypeSynonyms _declarationsOparentTree _declarationsOpatternMatchWarnings _declarationsOsubstitution _declarationsOtypeSignatures _declarationsOtypeschemeMap _declarationsOuniqueChunk)
_declarationsObindingGroups = rule236 ()
_lhsOassumptions :: Assumptions
(_csetBinds,_lhsOassumptions) = rule237 _aset _cinfo _lhsIimportEnvironment
_constraints = rule238 _cset _csetBinds
_lhsObetaUnique :: Int
(_aset,_cset,_inheritedBDG,_chunkNr,_lhsObetaUnique,_implicitsFM) = rule239 _declarationsIbetaUnique _declarationsIbindingGroups _declarationsItypeSignatures _declarationsIuniqueChunk _lhsIcurrentChunk _lhsImonos
_inferredTypes = rule240 _implicitsFM _lhsItypeschemeMap
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule241 _declarationsIcollectWarnings _declarationsIsimplePatNames _inferredTypes
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule242 _declarationsIcollectErrors _declarationsIrestrictedNames _inferredTypes
_lhsOtoplevelTypes :: TypeEnvironment
_lhsOtoplevelTypes = rule243 _declarationsItypeSignatures _inferredTypes
_allTypeSchemes = rule244 _lhsIallTypeSchemes _localTypes
_localTypes = rule245 _declarationsIbindingGroups _declarationsItypeSignatures _inferredTypes
_declarationsOtypeSignatures = rule246 ()
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule247 _chunkNr
_cinfo = rule248 ()
_declInfo = rule249 _declarationsIself _lhsImonos
_parentTree = rule250 _declInfo _declarationsIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule251 _parentTree
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule252 _declarationsIcollectInstances
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule253 _declarationsIdeclVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule254 _declarationsIunboundNames
_self = rule255 _declarationsIself _importdeclarationsIself _rangeIself
_lhsOself :: Body
_lhsOself = rule256 _self
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule257 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule258 _declarationsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule259 _declarationsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule260 _declarationsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule261 _declarationsIpatternMatchWarnings
_declarationsOallPatterns = rule262 _lhsIallPatterns
_declarationsOallTypeSchemes = rule263 _allTypeSchemes
_declarationsOavailablePredicates = rule264 _lhsIavailablePredicates
_declarationsObetaUnique = rule265 _lhsIbetaUnique
_declarationsOclassEnvironment = rule266 _lhsIclassEnvironment
_declarationsOcollectErrors = rule267 _lhsIcollectErrors
_declarationsOcollectWarnings = rule268 _lhsIcollectWarnings
_declarationsOcounter = rule269 _lhsIcounter
_declarationsOcurrentChunk = rule270 _lhsIcurrentChunk
_declarationsOdictionaryEnvironment = rule271 _lhsIdictionaryEnvironment
_declarationsOimportEnvironment = rule272 _lhsIimportEnvironment
_declarationsOinheritedBDG = rule273 _inheritedBDG
_declarationsOmatchIO = rule274 _lhsImatchIO
_declarationsOmonos = rule275 _lhsImonos
_declarationsOnamesInScope = rule276 _lhsInamesInScope
_declarationsOorderedTypeSynonyms = rule277 _lhsIorderedTypeSynonyms
_declarationsOparentTree = rule278 _parentTree
_declarationsOpatternMatchWarnings = rule279 _lhsIpatternMatchWarnings
_declarationsOsubstitution = rule280 _lhsIsubstitution
_declarationsOtypeschemeMap = rule281 _lhsItypeschemeMap
_declarationsOuniqueChunk = rule282 _lhsIuniqueChunk
__result_ = T_Body_vOut13 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOtoplevelTypes _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Body_s14 v13
rule236 = \ (_ :: ()) ->
[]
rule237 = \ _aset _cinfo ((_lhsIimportEnvironment) :: ImportEnvironment) ->
(typeEnvironment _lhsIimportEnvironment .:::. _aset) _cinfo
rule238 = \ _cset _csetBinds ->
_csetBinds .>>. _cset
rule239 = \ ((_declarationsIbetaUnique) :: Int) ((_declarationsIbindingGroups) :: BindingGroups) ((_declarationsItypeSignatures) :: TypeEnvironment) ((_declarationsIuniqueChunk) :: Int) ((_lhsIcurrentChunk) :: Int) ((_lhsImonos) :: Monos) ->
let inputBDG = (True, _lhsIcurrentChunk, _declarationsIuniqueChunk, _lhsImonos, _declarationsItypeSignatures, Nothing, _declarationsIbetaUnique)
in performBindingGroup inputBDG _declarationsIbindingGroups
rule240 = \ _implicitsFM ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
findInferredTypes _lhsItypeschemeMap _implicitsFM
rule241 = \ ((_declarationsIcollectWarnings) :: Warnings) ((_declarationsIsimplePatNames) :: Names) _inferredTypes ->
missingTypeSignature True _declarationsIsimplePatNames _inferredTypes
++ _declarationsIcollectWarnings
rule242 = \ ((_declarationsIcollectErrors) :: TypeErrors) ((_declarationsIrestrictedNames) :: Names) _inferredTypes ->
restrictedNameErrors _inferredTypes _declarationsIrestrictedNames
++ _declarationsIcollectErrors
rule243 = \ ((_declarationsItypeSignatures) :: TypeEnvironment) _inferredTypes ->
_declarationsItypeSignatures `M.union` _inferredTypes
rule244 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) _localTypes ->
_localTypes `M.union` _lhsIallTypeSchemes
rule245 = \ ((_declarationsIbindingGroups) :: BindingGroups) ((_declarationsItypeSignatures) :: TypeEnvironment) _inferredTypes ->
makeLocalTypeEnv (_declarationsItypeSignatures `M.union` _inferredTypes) _declarationsIbindingGroups
rule246 = \ (_ :: ()) ->
M.empty
rule247 = \ _chunkNr ->
_chunkNr
rule248 = \ (_ :: ()) ->
\name -> variableConstraint "variable" (nameToUHA_Expr name)
[ FolkloreConstraint, HasTrustFactor 10.0, IsImported name ]
rule249 = \ ((_declarationsIself) :: Declarations) ((_lhsImonos) :: Monos) ->
LocalInfo { self = UHA_Decls _declarationsIself
, assignedType = Nothing
, monos = _lhsImonos
}
rule250 = \ _declInfo ((_declarationsIinfoTrees) :: InfoTrees) ->
root _declInfo _declarationsIinfoTrees
rule251 = \ _parentTree ->
_parentTree
rule252 = \ ((_declarationsIcollectInstances) :: [(Name, Instance)]) ->
_declarationsIcollectInstances
rule253 = \ ((_declarationsIdeclVarNames) :: Names) ->
_declarationsIdeclVarNames
rule254 = \ ((_declarationsIunboundNames) :: Names) ->
_declarationsIunboundNames
rule255 = \ ((_declarationsIself) :: Declarations) ((_importdeclarationsIself) :: ImportDeclarations) ((_rangeIself) :: Range) ->
Body_Body _rangeIself _importdeclarationsIself _declarationsIself
rule256 = \ _self ->
_self
rule257 = \ _constraints ->
_constraints
rule258 = \ ((_declarationsIcounter) :: Int) ->
_declarationsIcounter
rule259 = \ ((_declarationsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_declarationsIdictionaryEnvironment
rule260 = \ ((_declarationsImatchIO) :: IO ()) ->
_declarationsImatchIO
rule261 = \ ((_declarationsIpatternMatchWarnings) :: [Warning]) ->
_declarationsIpatternMatchWarnings
rule262 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule263 = \ _allTypeSchemes ->
_allTypeSchemes
rule264 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule265 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule266 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule267 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule268 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule269 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule270 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule271 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule272 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule273 = \ _inheritedBDG ->
_inheritedBDG
rule274 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule275 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule276 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule277 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule278 = \ _parentTree ->
_parentTree
rule279 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule280 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule281 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule282 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
data Inh_Constructor = Inh_Constructor { counter_Inh_Constructor :: (Int), namesInScope_Inh_Constructor :: (Names) }
data Syn_Constructor = Syn_Constructor { counter_Syn_Constructor :: (Int), self_Syn_Constructor :: (Constructor), unboundNames_Syn_Constructor :: (Names) }
wrap_Constructor :: T_Constructor -> Inh_Constructor -> (Syn_Constructor )
wrap_Constructor (T_Constructor act) (Inh_Constructor _lhsIcounter _lhsInamesInScope) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Constructor_vIn16 _lhsIcounter _lhsInamesInScope
(T_Constructor_vOut16 _lhsOcounter _lhsOself _lhsOunboundNames) <- return (inv_Constructor_s17 sem arg)
return (Syn_Constructor _lhsOcounter _lhsOself _lhsOunboundNames)
)
sem_Constructor :: Constructor -> T_Constructor
sem_Constructor ( Constructor_Constructor range_ constructor_ types_ ) = sem_Constructor_Constructor ( sem_Range range_ ) ( sem_Name constructor_ ) ( sem_AnnotatedTypes types_ )
sem_Constructor ( Constructor_Infix range_ leftType_ constructorOperator_ rightType_ ) = sem_Constructor_Infix ( sem_Range range_ ) ( sem_AnnotatedType leftType_ ) ( sem_Name constructorOperator_ ) ( sem_AnnotatedType rightType_ )
sem_Constructor ( Constructor_Record range_ constructor_ fieldDeclarations_ ) = sem_Constructor_Record ( sem_Range range_ ) ( sem_Name constructor_ ) ( sem_FieldDeclarations fieldDeclarations_ )
newtype T_Constructor = T_Constructor {
attach_T_Constructor :: Identity (T_Constructor_s17 )
}
newtype T_Constructor_s17 = C_Constructor_s17 {
inv_Constructor_s17 :: (T_Constructor_v16 )
}
data T_Constructor_s18 = C_Constructor_s18
type T_Constructor_v16 = (T_Constructor_vIn16 ) -> (T_Constructor_vOut16 )
data T_Constructor_vIn16 = T_Constructor_vIn16 (Int) (Names)
data T_Constructor_vOut16 = T_Constructor_vOut16 (Int) (Constructor) (Names)
sem_Constructor_Constructor :: T_Range -> T_Name -> T_AnnotatedTypes -> T_Constructor
sem_Constructor_Constructor arg_range_ arg_constructor_ arg_types_ = T_Constructor (return st17) where
st17 = let
v16 :: T_Constructor_v16
v16 = \ (T_Constructor_vIn16 _lhsIcounter _lhsInamesInScope) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_constructorX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_constructor_))
_typesX11 = Control.Monad.Identity.runIdentity (attach_T_AnnotatedTypes (arg_types_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _constructorIself) = inv_Name_s113 _constructorX113 (T_Name_vIn112 )
(T_AnnotatedTypes_vOut10 _typesIcounter _typesIself _typesIunboundNames) = inv_AnnotatedTypes_s11 _typesX11 (T_AnnotatedTypes_vIn10 _typesOcounter _typesOnamesInScope)
_lhsOunboundNames :: Names
_lhsOunboundNames = rule283 _typesIunboundNames
_self = rule284 _constructorIself _rangeIself _typesIself
_lhsOself :: Constructor
_lhsOself = rule285 _self
_lhsOcounter :: Int
_lhsOcounter = rule286 _typesIcounter
_typesOcounter = rule287 _lhsIcounter
_typesOnamesInScope = rule288 _lhsInamesInScope
__result_ = T_Constructor_vOut16 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_Constructor_s17 v16
rule283 = \ ((_typesIunboundNames) :: Names) ->
_typesIunboundNames
rule284 = \ ((_constructorIself) :: Name) ((_rangeIself) :: Range) ((_typesIself) :: AnnotatedTypes) ->
Constructor_Constructor _rangeIself _constructorIself _typesIself
rule285 = \ _self ->
_self
rule286 = \ ((_typesIcounter) :: Int) ->
_typesIcounter
rule287 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule288 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
sem_Constructor_Infix :: T_Range -> T_AnnotatedType -> T_Name -> T_AnnotatedType -> T_Constructor
sem_Constructor_Infix arg_range_ arg_leftType_ arg_constructorOperator_ arg_rightType_ = T_Constructor (return st17) where
st17 = let
v16 :: T_Constructor_v16
v16 = \ (T_Constructor_vIn16 _lhsIcounter _lhsInamesInScope) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_leftTypeX8 = Control.Monad.Identity.runIdentity (attach_T_AnnotatedType (arg_leftType_))
_constructorOperatorX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_constructorOperator_))
_rightTypeX8 = Control.Monad.Identity.runIdentity (attach_T_AnnotatedType (arg_rightType_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_AnnotatedType_vOut7 _leftTypeIcounter _leftTypeIself _leftTypeIunboundNames) = inv_AnnotatedType_s8 _leftTypeX8 (T_AnnotatedType_vIn7 _leftTypeOcounter _leftTypeOnamesInScope)
(T_Name_vOut112 _constructorOperatorIself) = inv_Name_s113 _constructorOperatorX113 (T_Name_vIn112 )
(T_AnnotatedType_vOut7 _rightTypeIcounter _rightTypeIself _rightTypeIunboundNames) = inv_AnnotatedType_s8 _rightTypeX8 (T_AnnotatedType_vIn7 _rightTypeOcounter _rightTypeOnamesInScope)
_lhsOunboundNames :: Names
_lhsOunboundNames = rule289 _leftTypeIunboundNames _rightTypeIunboundNames
_self = rule290 _constructorOperatorIself _leftTypeIself _rangeIself _rightTypeIself
_lhsOself :: Constructor
_lhsOself = rule291 _self
_lhsOcounter :: Int
_lhsOcounter = rule292 _rightTypeIcounter
_leftTypeOcounter = rule293 _lhsIcounter
_leftTypeOnamesInScope = rule294 _lhsInamesInScope
_rightTypeOcounter = rule295 _leftTypeIcounter
_rightTypeOnamesInScope = rule296 _lhsInamesInScope
__result_ = T_Constructor_vOut16 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_Constructor_s17 v16
rule289 = \ ((_leftTypeIunboundNames) :: Names) ((_rightTypeIunboundNames) :: Names) ->
_leftTypeIunboundNames ++ _rightTypeIunboundNames
rule290 = \ ((_constructorOperatorIself) :: Name) ((_leftTypeIself) :: AnnotatedType) ((_rangeIself) :: Range) ((_rightTypeIself) :: AnnotatedType) ->
Constructor_Infix _rangeIself _leftTypeIself _constructorOperatorIself _rightTypeIself
rule291 = \ _self ->
_self
rule292 = \ ((_rightTypeIcounter) :: Int) ->
_rightTypeIcounter
rule293 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule294 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule295 = \ ((_leftTypeIcounter) :: Int) ->
_leftTypeIcounter
rule296 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
sem_Constructor_Record :: T_Range -> T_Name -> T_FieldDeclarations -> T_Constructor
sem_Constructor_Record arg_range_ arg_constructor_ arg_fieldDeclarations_ = T_Constructor (return st17) where
st17 = let
v16 :: T_Constructor_v16
v16 = \ (T_Constructor_vIn16 _lhsIcounter _lhsInamesInScope) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_constructorX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_constructor_))
_fieldDeclarationsX50 = Control.Monad.Identity.runIdentity (attach_T_FieldDeclarations (arg_fieldDeclarations_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _constructorIself) = inv_Name_s113 _constructorX113 (T_Name_vIn112 )
(T_FieldDeclarations_vOut49 _fieldDeclarationsIcounter _fieldDeclarationsIself _fieldDeclarationsIunboundNames) = inv_FieldDeclarations_s50 _fieldDeclarationsX50 (T_FieldDeclarations_vIn49 _fieldDeclarationsOcounter _fieldDeclarationsOnamesInScope)
_lhsOunboundNames :: Names
_lhsOunboundNames = rule297 _fieldDeclarationsIunboundNames
_self = rule298 _constructorIself _fieldDeclarationsIself _rangeIself
_lhsOself :: Constructor
_lhsOself = rule299 _self
_lhsOcounter :: Int
_lhsOcounter = rule300 _fieldDeclarationsIcounter
_fieldDeclarationsOcounter = rule301 _lhsIcounter
_fieldDeclarationsOnamesInScope = rule302 _lhsInamesInScope
__result_ = T_Constructor_vOut16 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_Constructor_s17 v16
rule297 = \ ((_fieldDeclarationsIunboundNames) :: Names) ->
_fieldDeclarationsIunboundNames
rule298 = \ ((_constructorIself) :: Name) ((_fieldDeclarationsIself) :: FieldDeclarations) ((_rangeIself) :: Range) ->
Constructor_Record _rangeIself _constructorIself _fieldDeclarationsIself
rule299 = \ _self ->
_self
rule300 = \ ((_fieldDeclarationsIcounter) :: Int) ->
_fieldDeclarationsIcounter
rule301 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule302 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
data Inh_Constructors = Inh_Constructors { counter_Inh_Constructors :: (Int), namesInScope_Inh_Constructors :: (Names) }
data Syn_Constructors = Syn_Constructors { counter_Syn_Constructors :: (Int), self_Syn_Constructors :: (Constructors), unboundNames_Syn_Constructors :: (Names) }
wrap_Constructors :: T_Constructors -> Inh_Constructors -> (Syn_Constructors )
wrap_Constructors (T_Constructors act) (Inh_Constructors _lhsIcounter _lhsInamesInScope) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Constructors_vIn19 _lhsIcounter _lhsInamesInScope
(T_Constructors_vOut19 _lhsOcounter _lhsOself _lhsOunboundNames) <- return (inv_Constructors_s20 sem arg)
return (Syn_Constructors _lhsOcounter _lhsOself _lhsOunboundNames)
)
sem_Constructors :: Constructors -> T_Constructors
sem_Constructors list = Prelude.foldr sem_Constructors_Cons sem_Constructors_Nil (Prelude.map sem_Constructor list)
newtype T_Constructors = T_Constructors {
attach_T_Constructors :: Identity (T_Constructors_s20 )
}
newtype T_Constructors_s20 = C_Constructors_s20 {
inv_Constructors_s20 :: (T_Constructors_v19 )
}
data T_Constructors_s21 = C_Constructors_s21
type T_Constructors_v19 = (T_Constructors_vIn19 ) -> (T_Constructors_vOut19 )
data T_Constructors_vIn19 = T_Constructors_vIn19 (Int) (Names)
data T_Constructors_vOut19 = T_Constructors_vOut19 (Int) (Constructors) (Names)
sem_Constructors_Cons :: T_Constructor -> T_Constructors -> T_Constructors
sem_Constructors_Cons arg_hd_ arg_tl_ = T_Constructors (return st20) where
st20 = let
v19 :: T_Constructors_v19
v19 = \ (T_Constructors_vIn19 _lhsIcounter _lhsInamesInScope) -> ( let
_hdX17 = Control.Monad.Identity.runIdentity (attach_T_Constructor (arg_hd_))
_tlX20 = Control.Monad.Identity.runIdentity (attach_T_Constructors (arg_tl_))
(T_Constructor_vOut16 _hdIcounter _hdIself _hdIunboundNames) = inv_Constructor_s17 _hdX17 (T_Constructor_vIn16 _hdOcounter _hdOnamesInScope)
(T_Constructors_vOut19 _tlIcounter _tlIself _tlIunboundNames) = inv_Constructors_s20 _tlX20 (T_Constructors_vIn19 _tlOcounter _tlOnamesInScope)
_lhsOunboundNames :: Names
_lhsOunboundNames = rule303 _hdIunboundNames _tlIunboundNames
_self = rule304 _hdIself _tlIself
_lhsOself :: Constructors
_lhsOself = rule305 _self
_lhsOcounter :: Int
_lhsOcounter = rule306 _tlIcounter
_hdOcounter = rule307 _lhsIcounter
_hdOnamesInScope = rule308 _lhsInamesInScope
_tlOcounter = rule309 _hdIcounter
_tlOnamesInScope = rule310 _lhsInamesInScope
__result_ = T_Constructors_vOut19 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_Constructors_s20 v19
rule303 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule304 = \ ((_hdIself) :: Constructor) ((_tlIself) :: Constructors) ->
(:) _hdIself _tlIself
rule305 = \ _self ->
_self
rule306 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule307 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule308 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule309 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule310 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
sem_Constructors_Nil :: T_Constructors
sem_Constructors_Nil = T_Constructors (return st20) where
st20 = let
v19 :: T_Constructors_v19
v19 = \ (T_Constructors_vIn19 _lhsIcounter _lhsInamesInScope) -> ( let
_lhsOunboundNames :: Names
_lhsOunboundNames = rule311 ()
_self = rule312 ()
_lhsOself :: Constructors
_lhsOself = rule313 _self
_lhsOcounter :: Int
_lhsOcounter = rule314 _lhsIcounter
__result_ = T_Constructors_vOut19 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_Constructors_s20 v19
rule311 = \ (_ :: ()) ->
[]
rule312 = \ (_ :: ()) ->
[]
rule313 = \ _self ->
_self
rule314 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
data Inh_ContextItem = Inh_ContextItem { }
data Syn_ContextItem = Syn_ContextItem { self_Syn_ContextItem :: (ContextItem) }
wrap_ContextItem :: T_ContextItem -> Inh_ContextItem -> (Syn_ContextItem )
wrap_ContextItem (T_ContextItem act) (Inh_ContextItem ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_ContextItem_vIn22
(T_ContextItem_vOut22 _lhsOself) <- return (inv_ContextItem_s23 sem arg)
return (Syn_ContextItem _lhsOself)
)
sem_ContextItem :: ContextItem -> T_ContextItem
sem_ContextItem ( ContextItem_ContextItem range_ name_ types_ ) = sem_ContextItem_ContextItem ( sem_Range range_ ) ( sem_Name name_ ) ( sem_Types types_ )
newtype T_ContextItem = T_ContextItem {
attach_T_ContextItem :: Identity (T_ContextItem_s23 )
}
newtype T_ContextItem_s23 = C_ContextItem_s23 {
inv_ContextItem_s23 :: (T_ContextItem_v22 )
}
data T_ContextItem_s24 = C_ContextItem_s24
type T_ContextItem_v22 = (T_ContextItem_vIn22 ) -> (T_ContextItem_vOut22 )
data T_ContextItem_vIn22 = T_ContextItem_vIn22
data T_ContextItem_vOut22 = T_ContextItem_vOut22 (ContextItem)
sem_ContextItem_ContextItem :: T_Range -> T_Name -> T_Types -> T_ContextItem
sem_ContextItem_ContextItem arg_range_ arg_name_ arg_types_ = T_ContextItem (return st23) where
st23 = let
v22 :: T_ContextItem_v22
v22 = \ (T_ContextItem_vIn22 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_typesX167 = Control.Monad.Identity.runIdentity (attach_T_Types (arg_types_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_Types_vOut166 _typesIself) = inv_Types_s167 _typesX167 (T_Types_vIn166 )
_tyconEnv = rule315 ()
_self = rule316 _nameIself _rangeIself _typesIself
_lhsOself :: ContextItem
_lhsOself = rule317 _self
__result_ = T_ContextItem_vOut22 _lhsOself
in __result_ )
in C_ContextItem_s23 v22
rule315 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "ContextItem.ContextItem"
rule316 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ((_typesIself) :: Types) ->
ContextItem_ContextItem _rangeIself _nameIself _typesIself
rule317 = \ _self ->
_self
data Inh_ContextItems = Inh_ContextItems { }
data Syn_ContextItems = Syn_ContextItems { self_Syn_ContextItems :: (ContextItems) }
wrap_ContextItems :: T_ContextItems -> Inh_ContextItems -> (Syn_ContextItems )
wrap_ContextItems (T_ContextItems act) (Inh_ContextItems ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_ContextItems_vIn25
(T_ContextItems_vOut25 _lhsOself) <- return (inv_ContextItems_s26 sem arg)
return (Syn_ContextItems _lhsOself)
)
sem_ContextItems :: ContextItems -> T_ContextItems
sem_ContextItems list = Prelude.foldr sem_ContextItems_Cons sem_ContextItems_Nil (Prelude.map sem_ContextItem list)
newtype T_ContextItems = T_ContextItems {
attach_T_ContextItems :: Identity (T_ContextItems_s26 )
}
newtype T_ContextItems_s26 = C_ContextItems_s26 {
inv_ContextItems_s26 :: (T_ContextItems_v25 )
}
data T_ContextItems_s27 = C_ContextItems_s27
type T_ContextItems_v25 = (T_ContextItems_vIn25 ) -> (T_ContextItems_vOut25 )
data T_ContextItems_vIn25 = T_ContextItems_vIn25
data T_ContextItems_vOut25 = T_ContextItems_vOut25 (ContextItems)
sem_ContextItems_Cons :: T_ContextItem -> T_ContextItems -> T_ContextItems
sem_ContextItems_Cons arg_hd_ arg_tl_ = T_ContextItems (return st26) where
st26 = let
v25 :: T_ContextItems_v25
v25 = \ (T_ContextItems_vIn25 ) -> ( let
_hdX23 = Control.Monad.Identity.runIdentity (attach_T_ContextItem (arg_hd_))
_tlX26 = Control.Monad.Identity.runIdentity (attach_T_ContextItems (arg_tl_))
(T_ContextItem_vOut22 _hdIself) = inv_ContextItem_s23 _hdX23 (T_ContextItem_vIn22 )
(T_ContextItems_vOut25 _tlIself) = inv_ContextItems_s26 _tlX26 (T_ContextItems_vIn25 )
_self = rule318 _hdIself _tlIself
_lhsOself :: ContextItems
_lhsOself = rule319 _self
__result_ = T_ContextItems_vOut25 _lhsOself
in __result_ )
in C_ContextItems_s26 v25
rule318 = \ ((_hdIself) :: ContextItem) ((_tlIself) :: ContextItems) ->
(:) _hdIself _tlIself
rule319 = \ _self ->
_self
sem_ContextItems_Nil :: T_ContextItems
sem_ContextItems_Nil = T_ContextItems (return st26) where
st26 = let
v25 :: T_ContextItems_v25
v25 = \ (T_ContextItems_vIn25 ) -> ( let
_self = rule320 ()
_lhsOself :: ContextItems
_lhsOself = rule321 _self
__result_ = T_ContextItems_vOut25 _lhsOself
in __result_ )
in C_ContextItems_s26 v25
rule320 = \ (_ :: ()) ->
[]
rule321 = \ _self ->
_self
data Inh_Declaration = Inh_Declaration { allPatterns_Inh_Declaration :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Declaration :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_Declaration :: (Predicates), betaUnique_Inh_Declaration :: (Int), bindingGroups_Inh_Declaration :: (BindingGroups), classEnvironment_Inh_Declaration :: (ClassEnvironment), collectErrors_Inh_Declaration :: (TypeErrors), collectWarnings_Inh_Declaration :: (Warnings), counter_Inh_Declaration :: (Int), currentChunk_Inh_Declaration :: (Int), dictionaryEnvironment_Inh_Declaration :: (DictionaryEnvironment), importEnvironment_Inh_Declaration :: (ImportEnvironment), inheritedBDG_Inh_Declaration :: (InheritedBDG), matchIO_Inh_Declaration :: (IO ()), monos_Inh_Declaration :: (Monos), namesInScope_Inh_Declaration :: (Names), orderedTypeSynonyms_Inh_Declaration :: (OrderedTypeSynonyms), parentTree_Inh_Declaration :: (InfoTree), patternMatchWarnings_Inh_Declaration :: ([Warning]), substitution_Inh_Declaration :: (FixpointSubstitution), typeSignatures_Inh_Declaration :: (TypeEnvironment), typeschemeMap_Inh_Declaration :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_Declaration :: (Int) }
data Syn_Declaration = Syn_Declaration { betaUnique_Syn_Declaration :: (Int), bindingGroups_Syn_Declaration :: (BindingGroups), collectErrors_Syn_Declaration :: (TypeErrors), collectInstances_Syn_Declaration :: ([(Name, Instance)]), collectWarnings_Syn_Declaration :: (Warnings), counter_Syn_Declaration :: (Int), declVarNames_Syn_Declaration :: (Names), dictionaryEnvironment_Syn_Declaration :: (DictionaryEnvironment), infoTrees_Syn_Declaration :: (InfoTrees), matchIO_Syn_Declaration :: (IO ()), patternMatchWarnings_Syn_Declaration :: ([Warning]), restrictedNames_Syn_Declaration :: (Names), self_Syn_Declaration :: (Declaration), simplePatNames_Syn_Declaration :: (Names), typeSignatures_Syn_Declaration :: (TypeEnvironment), unboundNames_Syn_Declaration :: (Names), uniqueChunk_Syn_Declaration :: (Int) }
wrap_Declaration :: T_Declaration -> Inh_Declaration -> (Syn_Declaration )
wrap_Declaration (T_Declaration act) (Inh_Declaration _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk
(T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk) <- return (inv_Declaration_s29 sem arg)
return (Syn_Declaration _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk)
)
sem_Declaration :: Declaration -> T_Declaration
sem_Declaration ( Declaration_Hole range_ id_ ) = sem_Declaration_Hole ( sem_Range range_ ) id_
sem_Declaration ( Declaration_Type range_ simpletype_ type_ ) = sem_Declaration_Type ( sem_Range range_ ) ( sem_SimpleType simpletype_ ) ( sem_Type type_ )
sem_Declaration ( Declaration_Data range_ context_ simpletype_ constructors_ derivings_ ) = sem_Declaration_Data ( sem_Range range_ ) ( sem_ContextItems context_ ) ( sem_SimpleType simpletype_ ) ( sem_Constructors constructors_ ) ( sem_Names derivings_ )
sem_Declaration ( Declaration_Newtype range_ context_ simpletype_ constructor_ derivings_ ) = sem_Declaration_Newtype ( sem_Range range_ ) ( sem_ContextItems context_ ) ( sem_SimpleType simpletype_ ) ( sem_Constructor constructor_ ) ( sem_Names derivings_ )
sem_Declaration ( Declaration_Class range_ context_ simpletype_ where_ ) = sem_Declaration_Class ( sem_Range range_ ) ( sem_ContextItems context_ ) ( sem_SimpleType simpletype_ ) ( sem_MaybeDeclarations where_ )
sem_Declaration ( Declaration_Instance range_ context_ name_ types_ where_ ) = sem_Declaration_Instance ( sem_Range range_ ) ( sem_ContextItems context_ ) ( sem_Name name_ ) ( sem_Types types_ ) ( sem_MaybeDeclarations where_ )
sem_Declaration ( Declaration_Default range_ types_ ) = sem_Declaration_Default ( sem_Range range_ ) ( sem_Types types_ )
sem_Declaration ( Declaration_FunctionBindings range_ bindings_ ) = sem_Declaration_FunctionBindings ( sem_Range range_ ) ( sem_FunctionBindings bindings_ )
sem_Declaration ( Declaration_PatternBinding range_ pattern_ righthandside_ ) = sem_Declaration_PatternBinding ( sem_Range range_ ) ( sem_Pattern pattern_ ) ( sem_RightHandSide righthandside_ )
sem_Declaration ( Declaration_TypeSignature range_ names_ type_ ) = sem_Declaration_TypeSignature ( sem_Range range_ ) ( sem_Names names_ ) ( sem_Type type_ )
sem_Declaration ( Declaration_Fixity range_ fixity_ priority_ operators_ ) = sem_Declaration_Fixity ( sem_Range range_ ) ( sem_Fixity fixity_ ) ( sem_MaybeInt priority_ ) ( sem_Names operators_ )
sem_Declaration ( Declaration_Empty range_ ) = sem_Declaration_Empty ( sem_Range range_ )
newtype T_Declaration = T_Declaration {
attach_T_Declaration :: Identity (T_Declaration_s29 )
}
newtype T_Declaration_s29 = C_Declaration_s29 {
inv_Declaration_s29 :: (T_Declaration_v28 )
}
data T_Declaration_s30 = C_Declaration_s30
type T_Declaration_v28 = (T_Declaration_vIn28 ) -> (T_Declaration_vOut28 )
data T_Declaration_vIn28 = T_Declaration_vIn28 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Int) (BindingGroups) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (InheritedBDG) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (TypeEnvironment) (M.Map Int (Scheme Predicates)) (Int)
data T_Declaration_vOut28 = T_Declaration_vOut28 (Int) (BindingGroups) (TypeErrors) ([(Name, Instance)]) (Warnings) (Int) (Names) (DictionaryEnvironment) (InfoTrees) (IO ()) ([Warning]) (Names) (Declaration) (Names) (TypeEnvironment) (Names) (Int)
sem_Declaration_Hole :: T_Range -> (Integer) -> T_Declaration
sem_Declaration_Hole arg_range_ arg_id_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule322 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule323 ()
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule324 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule325 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule326 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule327 ()
_self = rule328 _rangeIself arg_id_
_lhsOself :: Declaration
_lhsOself = rule329 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule330 _lhsIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule331 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule332 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule333 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule334 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule335 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule336 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule337 _lhsIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule338 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule339 _lhsIuniqueChunk
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule322 = \ (_ :: ()) ->
[]
rule323 = \ (_ :: ()) ->
[]
rule324 = \ (_ :: ()) ->
[]
rule325 = \ (_ :: ()) ->
[]
rule326 = \ (_ :: ()) ->
[]
rule327 = \ (_ :: ()) ->
[]
rule328 = \ ((_rangeIself) :: Range) id_ ->
Declaration_Hole _rangeIself id_
rule329 = \ _self ->
_self
rule330 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule331 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule332 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule333 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule334 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule335 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule336 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule337 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule338 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule339 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Declaration_Type :: T_Range -> T_SimpleType -> T_Type -> T_Declaration
sem_Declaration_Type arg_range_ arg_simpletype_ arg_type_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_simpletypeX152 = Control.Monad.Identity.runIdentity (attach_T_SimpleType (arg_simpletype_))
_typeX164 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_type_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_SimpleType_vOut151 _simpletypeIname _simpletypeIself _simpletypeItypevariables) = inv_SimpleType_s152 _simpletypeX152 (T_SimpleType_vIn151 )
(T_Type_vOut163 _typeIself) = inv_Type_s164 _typeX164 (T_Type_vIn163 )
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule340 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule341 ()
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule342 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule343 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule344 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule345 ()
_self = rule346 _rangeIself _simpletypeIself _typeIself
_lhsOself :: Declaration
_lhsOself = rule347 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule348 _lhsIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule349 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule350 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule351 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule352 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule353 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule354 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule355 _lhsIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule356 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule357 _lhsIuniqueChunk
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule340 = \ (_ :: ()) ->
[]
rule341 = \ (_ :: ()) ->
[]
rule342 = \ (_ :: ()) ->
[]
rule343 = \ (_ :: ()) ->
[]
rule344 = \ (_ :: ()) ->
[]
rule345 = \ (_ :: ()) ->
[]
rule346 = \ ((_rangeIself) :: Range) ((_simpletypeIself) :: SimpleType) ((_typeIself) :: Type) ->
Declaration_Type _rangeIself _simpletypeIself _typeIself
rule347 = \ _self ->
_self
rule348 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule349 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule350 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule351 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule352 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule353 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule354 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule355 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule356 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule357 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Declaration_Data :: T_Range -> T_ContextItems -> T_SimpleType -> T_Constructors -> T_Names -> T_Declaration
sem_Declaration_Data arg_range_ arg_context_ arg_simpletype_ arg_constructors_ arg_derivings_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_contextX26 = Control.Monad.Identity.runIdentity (attach_T_ContextItems (arg_context_))
_simpletypeX152 = Control.Monad.Identity.runIdentity (attach_T_SimpleType (arg_simpletype_))
_constructorsX20 = Control.Monad.Identity.runIdentity (attach_T_Constructors (arg_constructors_))
_derivingsX116 = Control.Monad.Identity.runIdentity (attach_T_Names (arg_derivings_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_ContextItems_vOut25 _contextIself) = inv_ContextItems_s26 _contextX26 (T_ContextItems_vIn25 )
(T_SimpleType_vOut151 _simpletypeIname _simpletypeIself _simpletypeItypevariables) = inv_SimpleType_s152 _simpletypeX152 (T_SimpleType_vIn151 )
(T_Constructors_vOut19 _constructorsIcounter _constructorsIself _constructorsIunboundNames) = inv_Constructors_s20 _constructorsX20 (T_Constructors_vIn19 _constructorsOcounter _constructorsOnamesInScope)
(T_Names_vOut115 _derivingsIself) = inv_Names_s116 _derivingsX116 (T_Names_vIn115 )
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule358 _derivingsIself _simpletypeIname _simpletypeItypevariables
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule359 ()
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule360 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule361 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule362 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule363 _constructorsIunboundNames
_self = rule364 _constructorsIself _contextIself _derivingsIself _rangeIself _simpletypeIself
_lhsOself :: Declaration
_lhsOself = rule365 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule366 _lhsIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule367 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule368 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule369 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule370 _constructorsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule371 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule372 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule373 _lhsIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule374 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule375 _lhsIuniqueChunk
_constructorsOcounter = rule376 _lhsIcounter
_constructorsOnamesInScope = rule377 _lhsInamesInScope
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule358 = \ ((_derivingsIself) :: Names) ((_simpletypeIname) :: Name) ((_simpletypeItypevariables) :: Names) ->
[ (cl, makeInstance (show cl) (length _simpletypeItypevariables) (show _simpletypeIname) )
| cl <- _derivingsIself
]
rule359 = \ (_ :: ()) ->
[]
rule360 = \ (_ :: ()) ->
[]
rule361 = \ (_ :: ()) ->
[]
rule362 = \ (_ :: ()) ->
[]
rule363 = \ ((_constructorsIunboundNames) :: Names) ->
_constructorsIunboundNames
rule364 = \ ((_constructorsIself) :: Constructors) ((_contextIself) :: ContextItems) ((_derivingsIself) :: Names) ((_rangeIself) :: Range) ((_simpletypeIself) :: SimpleType) ->
Declaration_Data _rangeIself _contextIself _simpletypeIself _constructorsIself _derivingsIself
rule365 = \ _self ->
_self
rule366 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule367 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule368 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule369 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule370 = \ ((_constructorsIcounter) :: Int) ->
_constructorsIcounter
rule371 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule372 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule373 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule374 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule375 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule376 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule377 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
sem_Declaration_Newtype :: T_Range -> T_ContextItems -> T_SimpleType -> T_Constructor -> T_Names -> T_Declaration
sem_Declaration_Newtype arg_range_ arg_context_ arg_simpletype_ arg_constructor_ arg_derivings_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_contextX26 = Control.Monad.Identity.runIdentity (attach_T_ContextItems (arg_context_))
_simpletypeX152 = Control.Monad.Identity.runIdentity (attach_T_SimpleType (arg_simpletype_))
_constructorX17 = Control.Monad.Identity.runIdentity (attach_T_Constructor (arg_constructor_))
_derivingsX116 = Control.Monad.Identity.runIdentity (attach_T_Names (arg_derivings_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_ContextItems_vOut25 _contextIself) = inv_ContextItems_s26 _contextX26 (T_ContextItems_vIn25 )
(T_SimpleType_vOut151 _simpletypeIname _simpletypeIself _simpletypeItypevariables) = inv_SimpleType_s152 _simpletypeX152 (T_SimpleType_vIn151 )
(T_Constructor_vOut16 _constructorIcounter _constructorIself _constructorIunboundNames) = inv_Constructor_s17 _constructorX17 (T_Constructor_vIn16 _constructorOcounter _constructorOnamesInScope)
(T_Names_vOut115 _derivingsIself) = inv_Names_s116 _derivingsX116 (T_Names_vIn115 )
_infoTrees = rule378 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule379 ()
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule380 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule381 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule382 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule383 _constructorIunboundNames
_self = rule384 _constructorIself _contextIself _derivingsIself _rangeIself _simpletypeIself
_lhsOself :: Declaration
_lhsOself = rule385 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule386 _lhsIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule387 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule388 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule389 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule390 _constructorIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule391 _lhsIdictionaryEnvironment
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule392 _infoTrees
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule393 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule394 _lhsIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule395 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule396 _lhsIuniqueChunk
_constructorOcounter = rule397 _lhsIcounter
_constructorOnamesInScope = rule398 _lhsInamesInScope
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule378 = \ (_ :: ()) ->
globalInfoError
rule379 = \ (_ :: ()) ->
[]
rule380 = \ (_ :: ()) ->
[]
rule381 = \ (_ :: ()) ->
[]
rule382 = \ (_ :: ()) ->
[]
rule383 = \ ((_constructorIunboundNames) :: Names) ->
_constructorIunboundNames
rule384 = \ ((_constructorIself) :: Constructor) ((_contextIself) :: ContextItems) ((_derivingsIself) :: Names) ((_rangeIself) :: Range) ((_simpletypeIself) :: SimpleType) ->
Declaration_Newtype _rangeIself _contextIself _simpletypeIself _constructorIself _derivingsIself
rule385 = \ _self ->
_self
rule386 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule387 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule388 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule389 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule390 = \ ((_constructorIcounter) :: Int) ->
_constructorIcounter
rule391 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule392 = \ _infoTrees ->
_infoTrees
rule393 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule394 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule395 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule396 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule397 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule398 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
sem_Declaration_Class :: T_Range -> T_ContextItems -> T_SimpleType -> T_MaybeDeclarations -> T_Declaration
sem_Declaration_Class arg_range_ arg_context_ arg_simpletype_ arg_where_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_contextX26 = Control.Monad.Identity.runIdentity (attach_T_ContextItems (arg_context_))
_simpletypeX152 = Control.Monad.Identity.runIdentity (attach_T_SimpleType (arg_simpletype_))
_whereX89 = Control.Monad.Identity.runIdentity (attach_T_MaybeDeclarations (arg_where_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_ContextItems_vOut25 _contextIself) = inv_ContextItems_s26 _contextX26 (T_ContextItems_vIn25 )
(T_SimpleType_vOut151 _simpletypeIname _simpletypeIself _simpletypeItypevariables) = inv_SimpleType_s152 _simpletypeX152 (T_SimpleType_vIn151 )
(T_MaybeDeclarations_vOut88 _whereIassumptions _whereIbetaUnique _whereIcollectErrors _whereIcollectInstances _whereIcollectWarnings _whereIconstraints _whereIcounter _whereIdictionaryEnvironment _whereIinfoTrees _whereIlocalTypes _whereImatchIO _whereInamesInScope _whereIpatternMatchWarnings _whereIself _whereIunboundNames _whereIuniqueChunk) = inv_MaybeDeclarations_s89 _whereX89 (T_MaybeDeclarations_vIn88 _whereOallPatterns _whereOallTypeSchemes _whereOassumptions _whereOavailablePredicates _whereObetaUnique _whereOclassEnvironment _whereOcollectErrors _whereOcollectWarnings _whereOconstraints _whereOcounter _whereOcurrentChunk _whereOdictionaryEnvironment _whereOimportEnvironment _whereOmatchIO _whereOmonos _whereOnamesInScope _whereOorderedTypeSynonyms _whereOparentTree _whereOpatternMatchWarnings _whereOsubstitution _whereOtypeschemeMap _whereOunboundNames _whereOuniqueChunk)
(_assumptions,_constraints,_unboundNames) = rule399 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule400 _whereIcollectInstances
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule401 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule402 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule403 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule404 _unboundNames
_self = rule405 _contextIself _rangeIself _simpletypeIself _whereIself
_lhsOself :: Declaration
_lhsOself = rule406 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule407 _whereIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule408 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule409 _whereIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule410 _whereIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule411 _whereIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule412 _whereIdictionaryEnvironment
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule413 _whereIinfoTrees
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule414 _whereImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule415 _whereIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule416 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule417 _whereIuniqueChunk
_whereOallPatterns = rule418 _lhsIallPatterns
_whereOallTypeSchemes = rule419 _lhsIallTypeSchemes
_whereOassumptions = rule420 _assumptions
_whereOavailablePredicates = rule421 _lhsIavailablePredicates
_whereObetaUnique = rule422 _lhsIbetaUnique
_whereOclassEnvironment = rule423 _lhsIclassEnvironment
_whereOcollectErrors = rule424 _lhsIcollectErrors
_whereOcollectWarnings = rule425 _lhsIcollectWarnings
_whereOconstraints = rule426 _constraints
_whereOcounter = rule427 _lhsIcounter
_whereOcurrentChunk = rule428 _lhsIcurrentChunk
_whereOdictionaryEnvironment = rule429 _lhsIdictionaryEnvironment
_whereOimportEnvironment = rule430 _lhsIimportEnvironment
_whereOmatchIO = rule431 _lhsImatchIO
_whereOmonos = rule432 _lhsImonos
_whereOnamesInScope = rule433 _lhsInamesInScope
_whereOorderedTypeSynonyms = rule434 _lhsIorderedTypeSynonyms
_whereOparentTree = rule435 _lhsIparentTree
_whereOpatternMatchWarnings = rule436 _lhsIpatternMatchWarnings
_whereOsubstitution = rule437 _lhsIsubstitution
_whereOtypeschemeMap = rule438 _lhsItypeschemeMap
_whereOunboundNames = rule439 _unboundNames
_whereOuniqueChunk = rule440 _lhsIuniqueChunk
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule399 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "Declaration.Class"
rule400 = \ ((_whereIcollectInstances) :: [(Name, Instance)]) ->
_whereIcollectInstances
rule401 = \ (_ :: ()) ->
[]
rule402 = \ (_ :: ()) ->
[]
rule403 = \ (_ :: ()) ->
[]
rule404 = \ _unboundNames ->
_unboundNames
rule405 = \ ((_contextIself) :: ContextItems) ((_rangeIself) :: Range) ((_simpletypeIself) :: SimpleType) ((_whereIself) :: MaybeDeclarations) ->
Declaration_Class _rangeIself _contextIself _simpletypeIself _whereIself
rule406 = \ _self ->
_self
rule407 = \ ((_whereIbetaUnique) :: Int) ->
_whereIbetaUnique
rule408 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule409 = \ ((_whereIcollectErrors) :: TypeErrors) ->
_whereIcollectErrors
rule410 = \ ((_whereIcollectWarnings) :: Warnings) ->
_whereIcollectWarnings
rule411 = \ ((_whereIcounter) :: Int) ->
_whereIcounter
rule412 = \ ((_whereIdictionaryEnvironment) :: DictionaryEnvironment) ->
_whereIdictionaryEnvironment
rule413 = \ ((_whereIinfoTrees) :: InfoTrees) ->
_whereIinfoTrees
rule414 = \ ((_whereImatchIO) :: IO ()) ->
_whereImatchIO
rule415 = \ ((_whereIpatternMatchWarnings) :: [Warning]) ->
_whereIpatternMatchWarnings
rule416 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule417 = \ ((_whereIuniqueChunk) :: Int) ->
_whereIuniqueChunk
rule418 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule419 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule420 = \ _assumptions ->
_assumptions
rule421 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule422 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule423 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule424 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule425 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule426 = \ _constraints ->
_constraints
rule427 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule428 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule429 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule430 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule431 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule432 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule433 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule434 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule435 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule436 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule437 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule438 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule439 = \ _unboundNames ->
_unboundNames
rule440 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Declaration_Instance :: T_Range -> T_ContextItems -> T_Name -> T_Types -> T_MaybeDeclarations -> T_Declaration
sem_Declaration_Instance arg_range_ arg_context_ arg_name_ arg_types_ arg_where_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_contextX26 = Control.Monad.Identity.runIdentity (attach_T_ContextItems (arg_context_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_typesX167 = Control.Monad.Identity.runIdentity (attach_T_Types (arg_types_))
_whereX89 = Control.Monad.Identity.runIdentity (attach_T_MaybeDeclarations (arg_where_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_ContextItems_vOut25 _contextIself) = inv_ContextItems_s26 _contextX26 (T_ContextItems_vIn25 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_Types_vOut166 _typesIself) = inv_Types_s167 _typesX167 (T_Types_vIn166 )
(T_MaybeDeclarations_vOut88 _whereIassumptions _whereIbetaUnique _whereIcollectErrors _whereIcollectInstances _whereIcollectWarnings _whereIconstraints _whereIcounter _whereIdictionaryEnvironment _whereIinfoTrees _whereIlocalTypes _whereImatchIO _whereInamesInScope _whereIpatternMatchWarnings _whereIself _whereIunboundNames _whereIuniqueChunk) = inv_MaybeDeclarations_s89 _whereX89 (T_MaybeDeclarations_vIn88 _whereOallPatterns _whereOallTypeSchemes _whereOassumptions _whereOavailablePredicates _whereObetaUnique _whereOclassEnvironment _whereOcollectErrors _whereOcollectWarnings _whereOconstraints _whereOcounter _whereOcurrentChunk _whereOdictionaryEnvironment _whereOimportEnvironment _whereOmatchIO _whereOmonos _whereOnamesInScope _whereOorderedTypeSynonyms _whereOparentTree _whereOpatternMatchWarnings _whereOsubstitution _whereOtypeschemeMap _whereOunboundNames _whereOuniqueChunk)
(_assumptions,_constraints,_unboundNames) = rule441 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule442 _whereIcollectInstances
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule443 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule444 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule445 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule446 _unboundNames
_self = rule447 _contextIself _nameIself _rangeIself _typesIself _whereIself
_lhsOself :: Declaration
_lhsOself = rule448 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule449 _whereIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule450 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule451 _whereIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule452 _whereIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule453 _whereIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule454 _whereIdictionaryEnvironment
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule455 _whereIinfoTrees
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule456 _whereImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule457 _whereIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule458 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule459 _whereIuniqueChunk
_whereOallPatterns = rule460 _lhsIallPatterns
_whereOallTypeSchemes = rule461 _lhsIallTypeSchemes
_whereOassumptions = rule462 _assumptions
_whereOavailablePredicates = rule463 _lhsIavailablePredicates
_whereObetaUnique = rule464 _lhsIbetaUnique
_whereOclassEnvironment = rule465 _lhsIclassEnvironment
_whereOcollectErrors = rule466 _lhsIcollectErrors
_whereOcollectWarnings = rule467 _lhsIcollectWarnings
_whereOconstraints = rule468 _constraints
_whereOcounter = rule469 _lhsIcounter
_whereOcurrentChunk = rule470 _lhsIcurrentChunk
_whereOdictionaryEnvironment = rule471 _lhsIdictionaryEnvironment
_whereOimportEnvironment = rule472 _lhsIimportEnvironment
_whereOmatchIO = rule473 _lhsImatchIO
_whereOmonos = rule474 _lhsImonos
_whereOnamesInScope = rule475 _lhsInamesInScope
_whereOorderedTypeSynonyms = rule476 _lhsIorderedTypeSynonyms
_whereOparentTree = rule477 _lhsIparentTree
_whereOpatternMatchWarnings = rule478 _lhsIpatternMatchWarnings
_whereOsubstitution = rule479 _lhsIsubstitution
_whereOtypeschemeMap = rule480 _lhsItypeschemeMap
_whereOunboundNames = rule481 _unboundNames
_whereOuniqueChunk = rule482 _lhsIuniqueChunk
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule441 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "Declaration.Instance"
rule442 = \ ((_whereIcollectInstances) :: [(Name, Instance)]) ->
_whereIcollectInstances
rule443 = \ (_ :: ()) ->
[]
rule444 = \ (_ :: ()) ->
[]
rule445 = \ (_ :: ()) ->
[]
rule446 = \ _unboundNames ->
_unboundNames
rule447 = \ ((_contextIself) :: ContextItems) ((_nameIself) :: Name) ((_rangeIself) :: Range) ((_typesIself) :: Types) ((_whereIself) :: MaybeDeclarations) ->
Declaration_Instance _rangeIself _contextIself _nameIself _typesIself _whereIself
rule448 = \ _self ->
_self
rule449 = \ ((_whereIbetaUnique) :: Int) ->
_whereIbetaUnique
rule450 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule451 = \ ((_whereIcollectErrors) :: TypeErrors) ->
_whereIcollectErrors
rule452 = \ ((_whereIcollectWarnings) :: Warnings) ->
_whereIcollectWarnings
rule453 = \ ((_whereIcounter) :: Int) ->
_whereIcounter
rule454 = \ ((_whereIdictionaryEnvironment) :: DictionaryEnvironment) ->
_whereIdictionaryEnvironment
rule455 = \ ((_whereIinfoTrees) :: InfoTrees) ->
_whereIinfoTrees
rule456 = \ ((_whereImatchIO) :: IO ()) ->
_whereImatchIO
rule457 = \ ((_whereIpatternMatchWarnings) :: [Warning]) ->
_whereIpatternMatchWarnings
rule458 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule459 = \ ((_whereIuniqueChunk) :: Int) ->
_whereIuniqueChunk
rule460 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule461 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule462 = \ _assumptions ->
_assumptions
rule463 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule464 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule465 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule466 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule467 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule468 = \ _constraints ->
_constraints
rule469 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule470 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule471 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule472 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule473 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule474 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule475 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule476 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule477 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule478 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule479 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule480 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule481 = \ _unboundNames ->
_unboundNames
rule482 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Declaration_Default :: T_Range -> T_Types -> T_Declaration
sem_Declaration_Default arg_range_ arg_types_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_typesX167 = Control.Monad.Identity.runIdentity (attach_T_Types (arg_types_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Types_vOut166 _typesIself) = inv_Types_s167 _typesX167 (T_Types_vIn166 )
_infoTrees = rule483 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule484 ()
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule485 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule486 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule487 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule488 ()
_self = rule489 _rangeIself _typesIself
_lhsOself :: Declaration
_lhsOself = rule490 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule491 _lhsIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule492 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule493 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule494 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule495 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule496 _lhsIdictionaryEnvironment
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule497 _infoTrees
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule498 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule499 _lhsIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule500 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule501 _lhsIuniqueChunk
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule483 = \ (_ :: ()) ->
globalInfoError
rule484 = \ (_ :: ()) ->
[]
rule485 = \ (_ :: ()) ->
[]
rule486 = \ (_ :: ()) ->
[]
rule487 = \ (_ :: ()) ->
[]
rule488 = \ (_ :: ()) ->
[]
rule489 = \ ((_rangeIself) :: Range) ((_typesIself) :: Types) ->
Declaration_Default _rangeIself _typesIself
rule490 = \ _self ->
_self
rule491 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule492 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule493 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule494 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule495 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule496 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule497 = \ _infoTrees ->
_infoTrees
rule498 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule499 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule500 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule501 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Declaration_FunctionBindings :: T_Range -> T_FunctionBindings -> T_Declaration
sem_Declaration_FunctionBindings arg_range_ arg_bindings_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_bindingsX59 = Control.Monad.Identity.runIdentity (attach_T_FunctionBindings (arg_bindings_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_FunctionBindings_vOut58 _bindingsIargcount _bindingsIassumptions _bindingsIbetaUnique _bindingsIcollectErrors _bindingsIcollectInstances _bindingsIcollectWarnings _bindingsIconstraintslist _bindingsIcounter _bindingsIdictionaryEnvironment _bindingsIelementss _bindingsIinfoTrees _bindingsImatchIO _bindingsIname _bindingsInumberOfPatterns _bindingsIpatternMatchWarnings _bindingsIself _bindingsIunboundNames _bindingsIuniqueChunk _bindingsIunrwars) = inv_FunctionBindings_s59 _bindingsX59 (T_FunctionBindings_vIn58 _bindingsOallPatterns _bindingsOallTypeSchemes _bindingsOavailablePredicates _bindingsObetaRight _bindingsObetaUnique _bindingsObetasLeft _bindingsOclassEnvironment _bindingsOcollectErrors _bindingsOcollectWarnings _bindingsOcounter _bindingsOcurrentChunk _bindingsOdictionaryEnvironment _bindingsOimportEnvironment _bindingsOmatchIO _bindingsOmonos _bindingsOnamesInScope _bindingsOorderedTypeSynonyms _bindingsOparentTree _bindingsOpatternMatchWarnings _bindingsOsubstitution _bindingsOtypeschemeMap _bindingsOuniqueChunk)
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule502 _lhsIbindingGroups _mybdggrp
_bindingsObetaUnique = rule503 _bindingsInumberOfPatterns _lhsIbetaUnique
_bindingsOmonos = rule504 _bindingsIname _lhsIinheritedBDG _lhsImonos
_beta = rule505 _lhsIbetaUnique
_betaRight = rule506 _lhsIbetaUnique
_betasLeft = rule507 _bindingsInumberOfPatterns _lhsIbetaUnique
_newcon = rule508 _beta _betaRight _betasLeft _cinfo
_mybdggrp = rule509 _beta _bindingsIassumptions _bindingsIconstraintslist _bindingsIname _lhsIbetaUnique _newcon
_declPredicates = rule510 _beta _bindingsIname _lhsIallTypeSchemes _lhsIorderedTypeSynonyms _lhsIsubstitution
_bindingsOavailablePredicates = rule511 _declPredicates _lhsIavailablePredicates
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule512 _bindingsIdictionaryEnvironment _bindingsIname _declPredicates
_bindingsOcurrentChunk = rule513 _bindingsIname _lhsIinheritedBDG
_cinfo = rule514 _bindingsInumberOfPatterns _parentTree
_localInfo = rule515 _lhsImonos _self
_parentTree = rule516 _bindingsIinfoTrees _lhsIparentTree _localInfo
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule517 _parentTree
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule518 _bindingsIname
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule519 _beta _bindingsIargcount _bindingsIelementss _bindingsIname _bindingsIpatternMatchWarnings _bindingsIunrwars _lhsIimportEnvironment _lhsIsubstitution _rangeIself
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule520 _bindingsIcollectInstances
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule521 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule522 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule523 _bindingsIunboundNames
_self = rule524 _bindingsIself _rangeIself
_lhsOself :: Declaration
_lhsOself = rule525 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule526 _bindingsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule527 _bindingsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule528 _bindingsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule529 _bindingsIcounter
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule530 _bindingsImatchIO
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule531 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule532 _bindingsIuniqueChunk
_bindingsOallPatterns = rule533 _lhsIallPatterns
_bindingsOallTypeSchemes = rule534 _lhsIallTypeSchemes
_bindingsObetaRight = rule535 _betaRight
_bindingsObetasLeft = rule536 _betasLeft
_bindingsOclassEnvironment = rule537 _lhsIclassEnvironment
_bindingsOcollectErrors = rule538 _lhsIcollectErrors
_bindingsOcollectWarnings = rule539 _lhsIcollectWarnings
_bindingsOcounter = rule540 _lhsIcounter
_bindingsOdictionaryEnvironment = rule541 _lhsIdictionaryEnvironment
_bindingsOimportEnvironment = rule542 _lhsIimportEnvironment
_bindingsOmatchIO = rule543 _lhsImatchIO
_bindingsOnamesInScope = rule544 _lhsInamesInScope
_bindingsOorderedTypeSynonyms = rule545 _lhsIorderedTypeSynonyms
_bindingsOparentTree = rule546 _parentTree
_bindingsOpatternMatchWarnings = rule547 _lhsIpatternMatchWarnings
_bindingsOsubstitution = rule548 _lhsIsubstitution
_bindingsOtypeschemeMap = rule549 _lhsItypeschemeMap
_bindingsOuniqueChunk = rule550 _lhsIuniqueChunk
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule502 = \ ((_lhsIbindingGroups) :: BindingGroups) _mybdggrp ->
_mybdggrp : _lhsIbindingGroups
rule503 = \ ((_bindingsInumberOfPatterns) :: Int) ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 2 + _bindingsInumberOfPatterns
rule504 = \ ((_bindingsIname) :: Name) ((_lhsIinheritedBDG) :: InheritedBDG) ((_lhsImonos) :: Monos) ->
findMono _bindingsIname _lhsIinheritedBDG ++ _lhsImonos
rule505 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule506 = \ ((_lhsIbetaUnique) :: Int) ->
TVar (_lhsIbetaUnique + 1)
rule507 = \ ((_bindingsInumberOfPatterns) :: Int) ((_lhsIbetaUnique) :: Int) ->
take _bindingsInumberOfPatterns (map TVar [_lhsIbetaUnique + 2..])
rule508 = \ _beta _betaRight _betasLeft _cinfo ->
(_beta .==. foldr (.->.) _betaRight _betasLeft) _cinfo
rule509 = \ _beta ((_bindingsIassumptions) :: Assumptions) ((_bindingsIconstraintslist) :: ConstraintSets) ((_bindingsIname) :: Name) ((_lhsIbetaUnique) :: Int) _newcon ->
( M.singleton _bindingsIname _beta
, _bindingsIassumptions
, [ Node [ Phase (1) [_newcon]
, Receive _lhsIbetaUnique
, Node _bindingsIconstraintslist
]
]
)
rule510 = \ _beta ((_bindingsIname) :: Name) ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ((_lhsIsubstitution) :: FixpointSubstitution) ->
let scheme = M.findWithDefault err (NameWithRange _bindingsIname) _lhsIallTypeSchemes
predicates = matchTypeWithScheme _lhsIorderedTypeSynonyms
(_lhsIsubstitution |-> _beta)
(_lhsIsubstitution |-> scheme)
err = internalError "TypeInferenceOverloading.ag" "n/a" "could not find type for function binding"
in expandPredicates _lhsIorderedTypeSynonyms predicates
rule511 = \ _declPredicates ((_lhsIavailablePredicates) :: Predicates) ->
_declPredicates ++ _lhsIavailablePredicates
rule512 = \ ((_bindingsIdictionaryEnvironment) :: DictionaryEnvironment) ((_bindingsIname) :: Name) _declPredicates ->
addForDeclaration _bindingsIname _declPredicates _bindingsIdictionaryEnvironment
rule513 = \ ((_bindingsIname) :: Name) ((_lhsIinheritedBDG) :: InheritedBDG) ->
findCurrentChunk _bindingsIname _lhsIinheritedBDG
rule514 = \ ((_bindingsInumberOfPatterns) :: Int) _parentTree ->
resultConstraint "function bindings (INTERNAL ERROR)" _parentTree
[ FolkloreConstraint, highlyTrusted, FuntionBindingEdge _bindingsInumberOfPatterns ]
rule515 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Decl _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule516 = \ ((_bindingsIinfoTrees) :: InfoTrees) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo _bindingsIinfoTrees
rule517 = \ _parentTree ->
[_parentTree]
rule518 = \ ((_bindingsIname) :: Name) ->
[_bindingsIname]
rule519 = \ _beta ((_bindingsIargcount) :: Int) ((_bindingsIelementss) :: [([PatternElement], Bool)]) ((_bindingsIname) :: Name) ((_bindingsIpatternMatchWarnings) :: [Warning]) ((_bindingsIunrwars) :: [Warning]) ((_lhsIimportEnvironment) :: ImportEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) ((_rangeIself) :: Range) ->
patternMatchWarnings _lhsIimportEnvironment
_lhsIsubstitution
_beta
(take _bindingsIargcount . fst . functionSpine)
_bindingsIelementss
_rangeIself
(Just _bindingsIname)
True
_bindingsIunrwars
"function bindings"
"="
++ _bindingsIpatternMatchWarnings
rule520 = \ ((_bindingsIcollectInstances) :: [(Name, Instance)]) ->
_bindingsIcollectInstances
rule521 = \ (_ :: ()) ->
[]
rule522 = \ (_ :: ()) ->
[]
rule523 = \ ((_bindingsIunboundNames) :: Names) ->
_bindingsIunboundNames
rule524 = \ ((_bindingsIself) :: FunctionBindings) ((_rangeIself) :: Range) ->
Declaration_FunctionBindings _rangeIself _bindingsIself
rule525 = \ _self ->
_self
rule526 = \ ((_bindingsIbetaUnique) :: Int) ->
_bindingsIbetaUnique
rule527 = \ ((_bindingsIcollectErrors) :: TypeErrors) ->
_bindingsIcollectErrors
rule528 = \ ((_bindingsIcollectWarnings) :: Warnings) ->
_bindingsIcollectWarnings
rule529 = \ ((_bindingsIcounter) :: Int) ->
_bindingsIcounter
rule530 = \ ((_bindingsImatchIO) :: IO ()) ->
_bindingsImatchIO
rule531 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule532 = \ ((_bindingsIuniqueChunk) :: Int) ->
_bindingsIuniqueChunk
rule533 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule534 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule535 = \ _betaRight ->
_betaRight
rule536 = \ _betasLeft ->
_betasLeft
rule537 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule538 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule539 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule540 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule541 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule542 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule543 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule544 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule545 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule546 = \ _parentTree ->
_parentTree
rule547 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule548 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule549 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule550 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Declaration_PatternBinding :: T_Range -> T_Pattern -> T_RightHandSide -> T_Declaration
sem_Declaration_PatternBinding arg_range_ arg_pattern_ arg_righthandside_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_patternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))
_righthandsideX149 = Control.Monad.Identity.runIdentity (attach_T_RightHandSide (arg_righthandside_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Pattern_vOut118 _patternIbeta _patternIbetaUnique _patternIconstraints _patternIcounter _patternIelements _patternIenvironment _patternIinfoTree _patternIpatVarNames _patternIpatternMatchWarnings _patternIself _patternIunboundNames) = inv_Pattern_s119 _patternX119 (T_Pattern_vIn118 _patternObetaUnique _patternOcounter _patternOimportEnvironment _patternOmonos _patternOnamesInScope _patternOparentTree _patternOpatternMatchWarnings)
(T_RightHandSide_vOut148 _righthandsideIassumptions _righthandsideIbetaUnique _righthandsideIcollectErrors _righthandsideIcollectInstances _righthandsideIcollectWarnings _righthandsideIconstraints _righthandsideIcounter _righthandsideIdictionaryEnvironment _righthandsideIfallthrough _righthandsideIinfoTree _righthandsideImatchIO _righthandsideIpatternMatchWarnings _righthandsideIself _righthandsideIunboundNames _righthandsideIuniqueChunk) = inv_RightHandSide_s149 _righthandsideX149 (T_RightHandSide_vIn148 _righthandsideOallPatterns _righthandsideOallTypeSchemes _righthandsideOavailablePredicates _righthandsideObetaRight _righthandsideObetaUnique _righthandsideOclassEnvironment _righthandsideOcollectErrors _righthandsideOcollectWarnings _righthandsideOcounter _righthandsideOcurrentChunk _righthandsideOdictionaryEnvironment _righthandsideOimportEnvironment _righthandsideOmatchIO _righthandsideOmonos _righthandsideOnamesInScope _righthandsideOorderedTypeSynonyms _righthandsideOparentTree _righthandsideOpatternMatchWarnings _righthandsideOsubstitution _righthandsideOtypeschemeMap _righthandsideOuniqueChunk)
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule551 _lhsIbindingGroups _mybdggrp
_patternObetaUnique = rule552 _lhsIbetaUnique
_righthandsideOmonos = rule553 _lhsIinheritedBDG _lhsImonos _patternIenvironment
_betaRight = rule554 _lhsIbetaUnique
_newcon = rule555 _betaRight _cinfo _patternIbeta
_mybdggrp = rule556 _newcon _patternIconstraints _patternIenvironment _righthandsideIassumptions _righthandsideIconstraints
_declPredicates = rule557 _betaRight _lhsIallTypeSchemes _lhsIorderedTypeSynonyms _lhsIsubstitution _patternIself
_righthandsideOavailablePredicates = rule558 _declPredicates _lhsIavailablePredicates
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule559 _declPredicates _righthandsideIdictionaryEnvironment
_lhsOrestrictedNames :: Names
_lhsOsimplePatNames :: Names
(_lhsOrestrictedNames,_lhsOsimplePatNames) = rule560 _patternIpatVarNames _patternIself
_righthandsideOcurrentChunk = rule561 _lhsIinheritedBDG _patternIenvironment
_cinfo = rule562 _parentTree
_localInfo = rule563 _lhsImonos _self
_parentTree = rule564 _lhsIparentTree _localInfo _patternIinfoTree _righthandsideIinfoTree
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule565 _parentTree
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule566 _patternIpatVarNames
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule567 _lhsIimportEnvironment _lhsIsubstitution _patternIbeta _patternIelements _rangeIself _righthandsideIfallthrough _righthandsideIpatternMatchWarnings
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule568 _righthandsideIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule569 _patternIunboundNames _righthandsideIunboundNames
_self = rule570 _patternIself _rangeIself _righthandsideIself
_lhsOself :: Declaration
_lhsOself = rule571 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule572 _righthandsideIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule573 _righthandsideIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule574 _righthandsideIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule575 _righthandsideIcounter
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule576 _righthandsideImatchIO
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule577 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule578 _righthandsideIuniqueChunk
_patternOcounter = rule579 _lhsIcounter
_patternOimportEnvironment = rule580 _lhsIimportEnvironment
_patternOmonos = rule581 _lhsImonos
_patternOnamesInScope = rule582 _lhsInamesInScope
_patternOparentTree = rule583 _parentTree
_patternOpatternMatchWarnings = rule584 _lhsIpatternMatchWarnings
_righthandsideOallPatterns = rule585 _lhsIallPatterns
_righthandsideOallTypeSchemes = rule586 _lhsIallTypeSchemes
_righthandsideObetaRight = rule587 _betaRight
_righthandsideObetaUnique = rule588 _patternIbetaUnique
_righthandsideOclassEnvironment = rule589 _lhsIclassEnvironment
_righthandsideOcollectErrors = rule590 _lhsIcollectErrors
_righthandsideOcollectWarnings = rule591 _lhsIcollectWarnings
_righthandsideOcounter = rule592 _patternIcounter
_righthandsideOdictionaryEnvironment = rule593 _lhsIdictionaryEnvironment
_righthandsideOimportEnvironment = rule594 _lhsIimportEnvironment
_righthandsideOmatchIO = rule595 _lhsImatchIO
_righthandsideOnamesInScope = rule596 _lhsInamesInScope
_righthandsideOorderedTypeSynonyms = rule597 _lhsIorderedTypeSynonyms
_righthandsideOparentTree = rule598 _parentTree
_righthandsideOpatternMatchWarnings = rule599 _patternIpatternMatchWarnings
_righthandsideOsubstitution = rule600 _lhsIsubstitution
_righthandsideOtypeschemeMap = rule601 _lhsItypeschemeMap
_righthandsideOuniqueChunk = rule602 _lhsIuniqueChunk
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule551 = \ ((_lhsIbindingGroups) :: BindingGroups) _mybdggrp ->
_mybdggrp : _lhsIbindingGroups
rule552 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule553 = \ ((_lhsIinheritedBDG) :: InheritedBDG) ((_lhsImonos) :: Monos) ((_patternIenvironment) :: PatternAssumptions) ->
findMono (head (M.keys _patternIenvironment)) _lhsIinheritedBDG ++ _lhsImonos
rule554 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule555 = \ _betaRight _cinfo ((_patternIbeta) :: Tp) ->
[ (_betaRight .==. _patternIbeta) _cinfo ]
rule556 = \ _newcon ((_patternIconstraints) :: ConstraintSet) ((_patternIenvironment) :: PatternAssumptions) ((_righthandsideIassumptions) :: Assumptions) ((_righthandsideIconstraints) :: ConstraintSet) ->
( _patternIenvironment
, _righthandsideIassumptions
, [ _newcon .>.
Node [ _patternIconstraints
, _righthandsideIconstraints
]
]
)
rule557 = \ _betaRight ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ((_lhsIsubstitution) :: FixpointSubstitution) ((_patternIself) :: Pattern) ->
case _patternIself of
Pattern_Variable _ name ->
let scheme = M.findWithDefault err (NameWithRange name) _lhsIallTypeSchemes
predicates = matchTypeWithScheme _lhsIorderedTypeSynonyms
(_lhsIsubstitution |-> _betaRight)
(_lhsIsubstitution |-> scheme)
err = internalError "TypeInferenceOverloading.ag" "n/a" ("could not find type for pattern binding "++show name)
in Just (name, expandPredicates _lhsIorderedTypeSynonyms predicates)
_ -> Nothing
rule558 = \ _declPredicates ((_lhsIavailablePredicates) :: Predicates) ->
case _declPredicates of
Just (_, ps) -> ps ++ _lhsIavailablePredicates
Nothing -> _lhsIavailablePredicates
rule559 = \ _declPredicates ((_righthandsideIdictionaryEnvironment) :: DictionaryEnvironment) ->
case _declPredicates of
Just (n, ps) -> addForDeclaration n ps _righthandsideIdictionaryEnvironment
Nothing -> _righthandsideIdictionaryEnvironment
rule560 = \ ((_patternIpatVarNames) :: Names) ((_patternIself) :: Pattern) ->
if isSimplePattern _patternIself
then ([], _patternIpatVarNames)
else (_patternIpatVarNames, [])
rule561 = \ ((_lhsIinheritedBDG) :: InheritedBDG) ((_patternIenvironment) :: PatternAssumptions) ->
findCurrentChunk (head (M.keys _patternIenvironment)) _lhsIinheritedBDG
rule562 = \ _parentTree ->
orphanConstraint 1 "right hand side" _parentTree
[]
rule563 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Decl _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule564 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ((_patternIinfoTree) :: InfoTree) ((_righthandsideIinfoTree) :: InfoTree) ->
node _lhsIparentTree _localInfo [_patternIinfoTree, _righthandsideIinfoTree]
rule565 = \ _parentTree ->
[_parentTree]
rule566 = \ ((_patternIpatVarNames) :: Names) ->
_patternIpatVarNames
rule567 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) ((_patternIbeta) :: Tp) ((_patternIelements) :: [PatternElement] ) ((_rangeIself) :: Range) ((_righthandsideIfallthrough) :: Bool) ((_righthandsideIpatternMatchWarnings) :: [Warning]) ->
patternMatchWarnings _lhsIimportEnvironment
_lhsIsubstitution
_patternIbeta
(:[])
[(_patternIelements, _righthandsideIfallthrough)]
_rangeIself
Nothing
False
[]
"pattern binding"
"="
++ _righthandsideIpatternMatchWarnings
rule568 = \ ((_righthandsideIcollectInstances) :: [(Name, Instance)]) ->
_righthandsideIcollectInstances
rule569 = \ ((_patternIunboundNames) :: Names) ((_righthandsideIunboundNames) :: Names) ->
_patternIunboundNames ++ _righthandsideIunboundNames
rule570 = \ ((_patternIself) :: Pattern) ((_rangeIself) :: Range) ((_righthandsideIself) :: RightHandSide) ->
Declaration_PatternBinding _rangeIself _patternIself _righthandsideIself
rule571 = \ _self ->
_self
rule572 = \ ((_righthandsideIbetaUnique) :: Int) ->
_righthandsideIbetaUnique
rule573 = \ ((_righthandsideIcollectErrors) :: TypeErrors) ->
_righthandsideIcollectErrors
rule574 = \ ((_righthandsideIcollectWarnings) :: Warnings) ->
_righthandsideIcollectWarnings
rule575 = \ ((_righthandsideIcounter) :: Int) ->
_righthandsideIcounter
rule576 = \ ((_righthandsideImatchIO) :: IO ()) ->
_righthandsideImatchIO
rule577 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule578 = \ ((_righthandsideIuniqueChunk) :: Int) ->
_righthandsideIuniqueChunk
rule579 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule580 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule581 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule582 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule583 = \ _parentTree ->
_parentTree
rule584 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule585 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule586 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule587 = \ _betaRight ->
_betaRight
rule588 = \ ((_patternIbetaUnique) :: Int) ->
_patternIbetaUnique
rule589 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule590 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule591 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule592 = \ ((_patternIcounter) :: Int) ->
_patternIcounter
rule593 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule594 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule595 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule596 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule597 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule598 = \ _parentTree ->
_parentTree
rule599 = \ ((_patternIpatternMatchWarnings) :: [Warning]) ->
_patternIpatternMatchWarnings
rule600 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule601 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule602 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Declaration_TypeSignature :: T_Range -> T_Names -> T_Type -> T_Declaration
sem_Declaration_TypeSignature arg_range_ arg_names_ arg_type_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_namesX116 = Control.Monad.Identity.runIdentity (attach_T_Names (arg_names_))
_typeX164 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_type_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Names_vOut115 _namesIself) = inv_Names_s116 _namesX116 (T_Names_vIn115 )
(T_Type_vOut163 _typeIself) = inv_Type_s164 _typeX164 (T_Type_vIn163 )
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule603 _lhsItypeSignatures _namesIself _typeScheme
_typeScheme = rule604 _typeIself
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule605 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule606 ()
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule607 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule608 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule609 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule610 ()
_self = rule611 _namesIself _rangeIself _typeIself
_lhsOself :: Declaration
_lhsOself = rule612 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule613 _lhsIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule614 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule615 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule616 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule617 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule618 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule619 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule620 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule621 _lhsIuniqueChunk
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule603 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ((_namesIself) :: Names) _typeScheme ->
_lhsItypeSignatures `M.union` (M.fromList [ (name, _typeScheme) | name <- _namesIself ])
rule604 = \ ((_typeIself) :: Type) ->
makeTpSchemeFromType _typeIself
rule605 = \ (_ :: ()) ->
[]
rule606 = \ (_ :: ()) ->
[]
rule607 = \ (_ :: ()) ->
[]
rule608 = \ (_ :: ()) ->
[]
rule609 = \ (_ :: ()) ->
[]
rule610 = \ (_ :: ()) ->
[]
rule611 = \ ((_namesIself) :: Names) ((_rangeIself) :: Range) ((_typeIself) :: Type) ->
Declaration_TypeSignature _rangeIself _namesIself _typeIself
rule612 = \ _self ->
_self
rule613 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule614 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule615 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule616 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule617 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule618 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule619 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule620 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule621 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Declaration_Fixity :: T_Range -> T_Fixity -> T_MaybeInt -> T_Names -> T_Declaration
sem_Declaration_Fixity arg_range_ arg_fixity_ arg_priority_ arg_operators_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_fixityX53 = Control.Monad.Identity.runIdentity (attach_T_Fixity (arg_fixity_))
_priorityX101 = Control.Monad.Identity.runIdentity (attach_T_MaybeInt (arg_priority_))
_operatorsX116 = Control.Monad.Identity.runIdentity (attach_T_Names (arg_operators_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Fixity_vOut52 _fixityIself) = inv_Fixity_s53 _fixityX53 (T_Fixity_vIn52 )
(T_MaybeInt_vOut100 _priorityIself) = inv_MaybeInt_s101 _priorityX101 (T_MaybeInt_vIn100 )
(T_Names_vOut115 _operatorsIself) = inv_Names_s116 _operatorsX116 (T_Names_vIn115 )
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule622 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule623 ()
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule624 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule625 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule626 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule627 ()
_self = rule628 _fixityIself _operatorsIself _priorityIself _rangeIself
_lhsOself :: Declaration
_lhsOself = rule629 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule630 _lhsIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule631 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule632 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule633 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule634 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule635 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule636 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule637 _lhsIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule638 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule639 _lhsIuniqueChunk
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule622 = \ (_ :: ()) ->
[]
rule623 = \ (_ :: ()) ->
[]
rule624 = \ (_ :: ()) ->
[]
rule625 = \ (_ :: ()) ->
[]
rule626 = \ (_ :: ()) ->
[]
rule627 = \ (_ :: ()) ->
[]
rule628 = \ ((_fixityIself) :: Fixity) ((_operatorsIself) :: Names) ((_priorityIself) :: MaybeInt) ((_rangeIself) :: Range) ->
Declaration_Fixity _rangeIself _fixityIself _priorityIself _operatorsIself
rule629 = \ _self ->
_self
rule630 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule631 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule632 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule633 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule634 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule635 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule636 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule637 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule638 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule639 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Declaration_Empty :: T_Range -> T_Declaration
sem_Declaration_Empty arg_range_ = T_Declaration (return st29) where
st29 = let
v28 :: T_Declaration_v28
v28 = \ (T_Declaration_vIn28 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule640 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule641 ()
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule642 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule643 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule644 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule645 ()
_self = rule646 _rangeIself
_lhsOself :: Declaration
_lhsOself = rule647 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule648 _lhsIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule649 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule650 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule651 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule652 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule653 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule654 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule655 _lhsIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule656 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule657 _lhsIuniqueChunk
__result_ = T_Declaration_vOut28 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declaration_s29 v28
rule640 = \ (_ :: ()) ->
[]
rule641 = \ (_ :: ()) ->
[]
rule642 = \ (_ :: ()) ->
[]
rule643 = \ (_ :: ()) ->
[]
rule644 = \ (_ :: ()) ->
[]
rule645 = \ (_ :: ()) ->
[]
rule646 = \ ((_rangeIself) :: Range) ->
Declaration_Empty _rangeIself
rule647 = \ _self ->
_self
rule648 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule649 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule650 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule651 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule652 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule653 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule654 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule655 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule656 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule657 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
data Inh_Declarations = Inh_Declarations { allPatterns_Inh_Declarations :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Declarations :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_Declarations :: (Predicates), betaUnique_Inh_Declarations :: (Int), bindingGroups_Inh_Declarations :: (BindingGroups), classEnvironment_Inh_Declarations :: (ClassEnvironment), collectErrors_Inh_Declarations :: (TypeErrors), collectWarnings_Inh_Declarations :: (Warnings), counter_Inh_Declarations :: (Int), currentChunk_Inh_Declarations :: (Int), dictionaryEnvironment_Inh_Declarations :: (DictionaryEnvironment), importEnvironment_Inh_Declarations :: (ImportEnvironment), inheritedBDG_Inh_Declarations :: (InheritedBDG), matchIO_Inh_Declarations :: (IO ()), monos_Inh_Declarations :: (Monos), namesInScope_Inh_Declarations :: (Names), orderedTypeSynonyms_Inh_Declarations :: (OrderedTypeSynonyms), parentTree_Inh_Declarations :: (InfoTree), patternMatchWarnings_Inh_Declarations :: ([Warning]), substitution_Inh_Declarations :: (FixpointSubstitution), typeSignatures_Inh_Declarations :: (TypeEnvironment), typeschemeMap_Inh_Declarations :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_Declarations :: (Int) }
data Syn_Declarations = Syn_Declarations { betaUnique_Syn_Declarations :: (Int), bindingGroups_Syn_Declarations :: (BindingGroups), collectErrors_Syn_Declarations :: (TypeErrors), collectInstances_Syn_Declarations :: ([(Name, Instance)]), collectWarnings_Syn_Declarations :: (Warnings), counter_Syn_Declarations :: (Int), declVarNames_Syn_Declarations :: (Names), dictionaryEnvironment_Syn_Declarations :: (DictionaryEnvironment), infoTrees_Syn_Declarations :: (InfoTrees), matchIO_Syn_Declarations :: (IO ()), patternMatchWarnings_Syn_Declarations :: ([Warning]), restrictedNames_Syn_Declarations :: (Names), self_Syn_Declarations :: (Declarations), simplePatNames_Syn_Declarations :: (Names), typeSignatures_Syn_Declarations :: (TypeEnvironment), unboundNames_Syn_Declarations :: (Names), uniqueChunk_Syn_Declarations :: (Int) }
wrap_Declarations :: T_Declarations -> Inh_Declarations -> (Syn_Declarations )
wrap_Declarations (T_Declarations act) (Inh_Declarations _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Declarations_vIn31 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk
(T_Declarations_vOut31 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk) <- return (inv_Declarations_s32 sem arg)
return (Syn_Declarations _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk)
)
sem_Declarations :: Declarations -> T_Declarations
sem_Declarations list = Prelude.foldr sem_Declarations_Cons sem_Declarations_Nil (Prelude.map sem_Declaration list)
newtype T_Declarations = T_Declarations {
attach_T_Declarations :: Identity (T_Declarations_s32 )
}
newtype T_Declarations_s32 = C_Declarations_s32 {
inv_Declarations_s32 :: (T_Declarations_v31 )
}
data T_Declarations_s33 = C_Declarations_s33
type T_Declarations_v31 = (T_Declarations_vIn31 ) -> (T_Declarations_vOut31 )
data T_Declarations_vIn31 = T_Declarations_vIn31 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Int) (BindingGroups) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (InheritedBDG) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (TypeEnvironment) (M.Map Int (Scheme Predicates)) (Int)
data T_Declarations_vOut31 = T_Declarations_vOut31 (Int) (BindingGroups) (TypeErrors) ([(Name, Instance)]) (Warnings) (Int) (Names) (DictionaryEnvironment) (InfoTrees) (IO ()) ([Warning]) (Names) (Declarations) (Names) (TypeEnvironment) (Names) (Int)
sem_Declarations_Cons :: T_Declaration -> T_Declarations -> T_Declarations
sem_Declarations_Cons arg_hd_ arg_tl_ = T_Declarations (return st32) where
st32 = let
v31 :: T_Declarations_v31
v31 = \ (T_Declarations_vIn31 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_hdX29 = Control.Monad.Identity.runIdentity (attach_T_Declaration (arg_hd_))
_tlX32 = Control.Monad.Identity.runIdentity (attach_T_Declarations (arg_tl_))
(T_Declaration_vOut28 _hdIbetaUnique _hdIbindingGroups _hdIcollectErrors _hdIcollectInstances _hdIcollectWarnings _hdIcounter _hdIdeclVarNames _hdIdictionaryEnvironment _hdIinfoTrees _hdImatchIO _hdIpatternMatchWarnings _hdIrestrictedNames _hdIself _hdIsimplePatNames _hdItypeSignatures _hdIunboundNames _hdIuniqueChunk) = inv_Declaration_s29 _hdX29 (T_Declaration_vIn28 _hdOallPatterns _hdOallTypeSchemes _hdOavailablePredicates _hdObetaUnique _hdObindingGroups _hdOclassEnvironment _hdOcollectErrors _hdOcollectWarnings _hdOcounter _hdOcurrentChunk _hdOdictionaryEnvironment _hdOimportEnvironment _hdOinheritedBDG _hdOmatchIO _hdOmonos _hdOnamesInScope _hdOorderedTypeSynonyms _hdOparentTree _hdOpatternMatchWarnings _hdOsubstitution _hdOtypeSignatures _hdOtypeschemeMap _hdOuniqueChunk)
(T_Declarations_vOut31 _tlIbetaUnique _tlIbindingGroups _tlIcollectErrors _tlIcollectInstances _tlIcollectWarnings _tlIcounter _tlIdeclVarNames _tlIdictionaryEnvironment _tlIinfoTrees _tlImatchIO _tlIpatternMatchWarnings _tlIrestrictedNames _tlIself _tlIsimplePatNames _tlItypeSignatures _tlIunboundNames _tlIuniqueChunk) = inv_Declarations_s32 _tlX32 (T_Declarations_vIn31 _tlOallPatterns _tlOallTypeSchemes _tlOavailablePredicates _tlObetaUnique _tlObindingGroups _tlOclassEnvironment _tlOcollectErrors _tlOcollectWarnings _tlOcounter _tlOcurrentChunk _tlOdictionaryEnvironment _tlOimportEnvironment _tlOinheritedBDG _tlOmatchIO _tlOmonos _tlOnamesInScope _tlOorderedTypeSynonyms _tlOparentTree _tlOpatternMatchWarnings _tlOsubstitution _tlOtypeSignatures _tlOtypeschemeMap _tlOuniqueChunk)
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule658 _hdIinfoTrees _tlIinfoTrees
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule659 _hdIcollectInstances _tlIcollectInstances
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule660 _hdIdeclVarNames _tlIdeclVarNames
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule661 _hdIrestrictedNames _tlIrestrictedNames
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule662 _hdIsimplePatNames _tlIsimplePatNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule663 _hdIunboundNames _tlIunboundNames
_self = rule664 _hdIself _tlIself
_lhsOself :: Declarations
_lhsOself = rule665 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule666 _tlIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule667 _tlIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule668 _tlIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule669 _tlIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule670 _tlIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule671 _tlIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule672 _tlImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule673 _tlIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule674 _tlItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule675 _tlIuniqueChunk
_hdOallPatterns = rule676 _lhsIallPatterns
_hdOallTypeSchemes = rule677 _lhsIallTypeSchemes
_hdOavailablePredicates = rule678 _lhsIavailablePredicates
_hdObetaUnique = rule679 _lhsIbetaUnique
_hdObindingGroups = rule680 _lhsIbindingGroups
_hdOclassEnvironment = rule681 _lhsIclassEnvironment
_hdOcollectErrors = rule682 _lhsIcollectErrors
_hdOcollectWarnings = rule683 _lhsIcollectWarnings
_hdOcounter = rule684 _lhsIcounter
_hdOcurrentChunk = rule685 _lhsIcurrentChunk
_hdOdictionaryEnvironment = rule686 _lhsIdictionaryEnvironment
_hdOimportEnvironment = rule687 _lhsIimportEnvironment
_hdOinheritedBDG = rule688 _lhsIinheritedBDG
_hdOmatchIO = rule689 _lhsImatchIO
_hdOmonos = rule690 _lhsImonos
_hdOnamesInScope = rule691 _lhsInamesInScope
_hdOorderedTypeSynonyms = rule692 _lhsIorderedTypeSynonyms
_hdOparentTree = rule693 _lhsIparentTree
_hdOpatternMatchWarnings = rule694 _lhsIpatternMatchWarnings
_hdOsubstitution = rule695 _lhsIsubstitution
_hdOtypeSignatures = rule696 _lhsItypeSignatures
_hdOtypeschemeMap = rule697 _lhsItypeschemeMap
_hdOuniqueChunk = rule698 _lhsIuniqueChunk
_tlOallPatterns = rule699 _lhsIallPatterns
_tlOallTypeSchemes = rule700 _lhsIallTypeSchemes
_tlOavailablePredicates = rule701 _lhsIavailablePredicates
_tlObetaUnique = rule702 _hdIbetaUnique
_tlObindingGroups = rule703 _hdIbindingGroups
_tlOclassEnvironment = rule704 _lhsIclassEnvironment
_tlOcollectErrors = rule705 _hdIcollectErrors
_tlOcollectWarnings = rule706 _hdIcollectWarnings
_tlOcounter = rule707 _hdIcounter
_tlOcurrentChunk = rule708 _lhsIcurrentChunk
_tlOdictionaryEnvironment = rule709 _hdIdictionaryEnvironment
_tlOimportEnvironment = rule710 _lhsIimportEnvironment
_tlOinheritedBDG = rule711 _lhsIinheritedBDG
_tlOmatchIO = rule712 _hdImatchIO
_tlOmonos = rule713 _lhsImonos
_tlOnamesInScope = rule714 _lhsInamesInScope
_tlOorderedTypeSynonyms = rule715 _lhsIorderedTypeSynonyms
_tlOparentTree = rule716 _lhsIparentTree
_tlOpatternMatchWarnings = rule717 _hdIpatternMatchWarnings
_tlOsubstitution = rule718 _lhsIsubstitution
_tlOtypeSignatures = rule719 _hdItypeSignatures
_tlOtypeschemeMap = rule720 _lhsItypeschemeMap
_tlOuniqueChunk = rule721 _hdIuniqueChunk
__result_ = T_Declarations_vOut31 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declarations_s32 v31
rule658 = \ ((_hdIinfoTrees) :: InfoTrees) ((_tlIinfoTrees) :: InfoTrees) ->
_hdIinfoTrees ++ _tlIinfoTrees
rule659 = \ ((_hdIcollectInstances) :: [(Name, Instance)]) ((_tlIcollectInstances) :: [(Name, Instance)]) ->
_hdIcollectInstances ++ _tlIcollectInstances
rule660 = \ ((_hdIdeclVarNames) :: Names) ((_tlIdeclVarNames) :: Names) ->
_hdIdeclVarNames ++ _tlIdeclVarNames
rule661 = \ ((_hdIrestrictedNames) :: Names) ((_tlIrestrictedNames) :: Names) ->
_hdIrestrictedNames ++ _tlIrestrictedNames
rule662 = \ ((_hdIsimplePatNames) :: Names) ((_tlIsimplePatNames) :: Names) ->
_hdIsimplePatNames ++ _tlIsimplePatNames
rule663 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule664 = \ ((_hdIself) :: Declaration) ((_tlIself) :: Declarations) ->
(:) _hdIself _tlIself
rule665 = \ _self ->
_self
rule666 = \ ((_tlIbetaUnique) :: Int) ->
_tlIbetaUnique
rule667 = \ ((_tlIbindingGroups) :: BindingGroups) ->
_tlIbindingGroups
rule668 = \ ((_tlIcollectErrors) :: TypeErrors) ->
_tlIcollectErrors
rule669 = \ ((_tlIcollectWarnings) :: Warnings) ->
_tlIcollectWarnings
rule670 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule671 = \ ((_tlIdictionaryEnvironment) :: DictionaryEnvironment) ->
_tlIdictionaryEnvironment
rule672 = \ ((_tlImatchIO) :: IO ()) ->
_tlImatchIO
rule673 = \ ((_tlIpatternMatchWarnings) :: [Warning]) ->
_tlIpatternMatchWarnings
rule674 = \ ((_tlItypeSignatures) :: TypeEnvironment) ->
_tlItypeSignatures
rule675 = \ ((_tlIuniqueChunk) :: Int) ->
_tlIuniqueChunk
rule676 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule677 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule678 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule679 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule680 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule681 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule682 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule683 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule684 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule685 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule686 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule687 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule688 = \ ((_lhsIinheritedBDG) :: InheritedBDG) ->
_lhsIinheritedBDG
rule689 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule690 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule691 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule692 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule693 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule694 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule695 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule696 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule697 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule698 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule699 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule700 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule701 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule702 = \ ((_hdIbetaUnique) :: Int) ->
_hdIbetaUnique
rule703 = \ ((_hdIbindingGroups) :: BindingGroups) ->
_hdIbindingGroups
rule704 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule705 = \ ((_hdIcollectErrors) :: TypeErrors) ->
_hdIcollectErrors
rule706 = \ ((_hdIcollectWarnings) :: Warnings) ->
_hdIcollectWarnings
rule707 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule708 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule709 = \ ((_hdIdictionaryEnvironment) :: DictionaryEnvironment) ->
_hdIdictionaryEnvironment
rule710 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule711 = \ ((_lhsIinheritedBDG) :: InheritedBDG) ->
_lhsIinheritedBDG
rule712 = \ ((_hdImatchIO) :: IO ()) ->
_hdImatchIO
rule713 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule714 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule715 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule716 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule717 = \ ((_hdIpatternMatchWarnings) :: [Warning]) ->
_hdIpatternMatchWarnings
rule718 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule719 = \ ((_hdItypeSignatures) :: TypeEnvironment) ->
_hdItypeSignatures
rule720 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule721 = \ ((_hdIuniqueChunk) :: Int) ->
_hdIuniqueChunk
sem_Declarations_Nil :: T_Declarations
sem_Declarations_Nil = T_Declarations (return st32) where
st32 = let
v31 :: T_Declarations_v31
v31 = \ (T_Declarations_vIn31 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIbindingGroups _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsIinheritedBDG _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeSignatures _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule722 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule723 ()
_lhsOdeclVarNames :: Names
_lhsOdeclVarNames = rule724 ()
_lhsOrestrictedNames :: Names
_lhsOrestrictedNames = rule725 ()
_lhsOsimplePatNames :: Names
_lhsOsimplePatNames = rule726 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule727 ()
_self = rule728 ()
_lhsOself :: Declarations
_lhsOself = rule729 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule730 _lhsIbetaUnique
_lhsObindingGroups :: BindingGroups
_lhsObindingGroups = rule731 _lhsIbindingGroups
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule732 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule733 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule734 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule735 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule736 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule737 _lhsIpatternMatchWarnings
_lhsOtypeSignatures :: TypeEnvironment
_lhsOtypeSignatures = rule738 _lhsItypeSignatures
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule739 _lhsIuniqueChunk
__result_ = T_Declarations_vOut31 _lhsObetaUnique _lhsObindingGroups _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdeclVarNames _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrestrictedNames _lhsOself _lhsOsimplePatNames _lhsOtypeSignatures _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_Declarations_s32 v31
rule722 = \ (_ :: ()) ->
[]
rule723 = \ (_ :: ()) ->
[]
rule724 = \ (_ :: ()) ->
[]
rule725 = \ (_ :: ()) ->
[]
rule726 = \ (_ :: ()) ->
[]
rule727 = \ (_ :: ()) ->
[]
rule728 = \ (_ :: ()) ->
[]
rule729 = \ _self ->
_self
rule730 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule731 = \ ((_lhsIbindingGroups) :: BindingGroups) ->
_lhsIbindingGroups
rule732 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule733 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule734 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule735 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule736 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule737 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule738 = \ ((_lhsItypeSignatures) :: TypeEnvironment) ->
_lhsItypeSignatures
rule739 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
data Inh_Export = Inh_Export { }
data Syn_Export = Syn_Export { self_Syn_Export :: (Export) }
wrap_Export :: T_Export -> Inh_Export -> (Syn_Export )
wrap_Export (T_Export act) (Inh_Export ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Export_vIn34
(T_Export_vOut34 _lhsOself) <- return (inv_Export_s35 sem arg)
return (Syn_Export _lhsOself)
)
sem_Export :: Export -> T_Export
sem_Export ( Export_Variable range_ name_ ) = sem_Export_Variable ( sem_Range range_ ) ( sem_Name name_ )
sem_Export ( Export_TypeOrClass range_ name_ names_ ) = sem_Export_TypeOrClass ( sem_Range range_ ) ( sem_Name name_ ) ( sem_MaybeNames names_ )
sem_Export ( Export_TypeOrClassComplete range_ name_ ) = sem_Export_TypeOrClassComplete ( sem_Range range_ ) ( sem_Name name_ )
sem_Export ( Export_Module range_ name_ ) = sem_Export_Module ( sem_Range range_ ) ( sem_Name name_ )
newtype T_Export = T_Export {
attach_T_Export :: Identity (T_Export_s35 )
}
newtype T_Export_s35 = C_Export_s35 {
inv_Export_s35 :: (T_Export_v34 )
}
data T_Export_s36 = C_Export_s36
type T_Export_v34 = (T_Export_vIn34 ) -> (T_Export_vOut34 )
data T_Export_vIn34 = T_Export_vIn34
data T_Export_vOut34 = T_Export_vOut34 (Export)
sem_Export_Variable :: T_Range -> T_Name -> T_Export
sem_Export_Variable arg_range_ arg_name_ = T_Export (return st35) where
st35 = let
v34 :: T_Export_v34
v34 = \ (T_Export_vIn34 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_self = rule740 _nameIself _rangeIself
_lhsOself :: Export
_lhsOself = rule741 _self
__result_ = T_Export_vOut34 _lhsOself
in __result_ )
in C_Export_s35 v34
rule740 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Export_Variable _rangeIself _nameIself
rule741 = \ _self ->
_self
sem_Export_TypeOrClass :: T_Range -> T_Name -> T_MaybeNames -> T_Export
sem_Export_TypeOrClass arg_range_ arg_name_ arg_names_ = T_Export (return st35) where
st35 = let
v34 :: T_Export_v34
v34 = \ (T_Export_vIn34 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_namesX107 = Control.Monad.Identity.runIdentity (attach_T_MaybeNames (arg_names_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_MaybeNames_vOut106 _namesIself) = inv_MaybeNames_s107 _namesX107 (T_MaybeNames_vIn106 )
_self = rule742 _nameIself _namesIself _rangeIself
_lhsOself :: Export
_lhsOself = rule743 _self
__result_ = T_Export_vOut34 _lhsOself
in __result_ )
in C_Export_s35 v34
rule742 = \ ((_nameIself) :: Name) ((_namesIself) :: MaybeNames) ((_rangeIself) :: Range) ->
Export_TypeOrClass _rangeIself _nameIself _namesIself
rule743 = \ _self ->
_self
sem_Export_TypeOrClassComplete :: T_Range -> T_Name -> T_Export
sem_Export_TypeOrClassComplete arg_range_ arg_name_ = T_Export (return st35) where
st35 = let
v34 :: T_Export_v34
v34 = \ (T_Export_vIn34 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_self = rule744 _nameIself _rangeIself
_lhsOself :: Export
_lhsOself = rule745 _self
__result_ = T_Export_vOut34 _lhsOself
in __result_ )
in C_Export_s35 v34
rule744 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Export_TypeOrClassComplete _rangeIself _nameIself
rule745 = \ _self ->
_self
sem_Export_Module :: T_Range -> T_Name -> T_Export
sem_Export_Module arg_range_ arg_name_ = T_Export (return st35) where
st35 = let
v34 :: T_Export_v34
v34 = \ (T_Export_vIn34 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_self = rule746 _nameIself _rangeIself
_lhsOself :: Export
_lhsOself = rule747 _self
__result_ = T_Export_vOut34 _lhsOself
in __result_ )
in C_Export_s35 v34
rule746 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Export_Module _rangeIself _nameIself
rule747 = \ _self ->
_self
data Inh_Exports = Inh_Exports { }
data Syn_Exports = Syn_Exports { self_Syn_Exports :: (Exports) }
wrap_Exports :: T_Exports -> Inh_Exports -> (Syn_Exports )
wrap_Exports (T_Exports act) (Inh_Exports ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Exports_vIn37
(T_Exports_vOut37 _lhsOself) <- return (inv_Exports_s38 sem arg)
return (Syn_Exports _lhsOself)
)
sem_Exports :: Exports -> T_Exports
sem_Exports list = Prelude.foldr sem_Exports_Cons sem_Exports_Nil (Prelude.map sem_Export list)
newtype T_Exports = T_Exports {
attach_T_Exports :: Identity (T_Exports_s38 )
}
newtype T_Exports_s38 = C_Exports_s38 {
inv_Exports_s38 :: (T_Exports_v37 )
}
data T_Exports_s39 = C_Exports_s39
type T_Exports_v37 = (T_Exports_vIn37 ) -> (T_Exports_vOut37 )
data T_Exports_vIn37 = T_Exports_vIn37
data T_Exports_vOut37 = T_Exports_vOut37 (Exports)
sem_Exports_Cons :: T_Export -> T_Exports -> T_Exports
sem_Exports_Cons arg_hd_ arg_tl_ = T_Exports (return st38) where
st38 = let
v37 :: T_Exports_v37
v37 = \ (T_Exports_vIn37 ) -> ( let
_hdX35 = Control.Monad.Identity.runIdentity (attach_T_Export (arg_hd_))
_tlX38 = Control.Monad.Identity.runIdentity (attach_T_Exports (arg_tl_))
(T_Export_vOut34 _hdIself) = inv_Export_s35 _hdX35 (T_Export_vIn34 )
(T_Exports_vOut37 _tlIself) = inv_Exports_s38 _tlX38 (T_Exports_vIn37 )
_self = rule748 _hdIself _tlIself
_lhsOself :: Exports
_lhsOself = rule749 _self
__result_ = T_Exports_vOut37 _lhsOself
in __result_ )
in C_Exports_s38 v37
rule748 = \ ((_hdIself) :: Export) ((_tlIself) :: Exports) ->
(:) _hdIself _tlIself
rule749 = \ _self ->
_self
sem_Exports_Nil :: T_Exports
sem_Exports_Nil = T_Exports (return st38) where
st38 = let
v37 :: T_Exports_v37
v37 = \ (T_Exports_vIn37 ) -> ( let
_self = rule750 ()
_lhsOself :: Exports
_lhsOself = rule751 _self
__result_ = T_Exports_vOut37 _lhsOself
in __result_ )
in C_Exports_s38 v37
rule750 = \ (_ :: ()) ->
[]
rule751 = \ _self ->
_self
data Inh_Expression = Inh_Expression { allPatterns_Inh_Expression :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Expression :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_Expression :: (Predicates), betaUnique_Inh_Expression :: (Int), classEnvironment_Inh_Expression :: (ClassEnvironment), collectErrors_Inh_Expression :: (TypeErrors), collectWarnings_Inh_Expression :: (Warnings), counter_Inh_Expression :: (Int), currentChunk_Inh_Expression :: (Int), dictionaryEnvironment_Inh_Expression :: (DictionaryEnvironment), importEnvironment_Inh_Expression :: (ImportEnvironment), matchIO_Inh_Expression :: (IO ()), monos_Inh_Expression :: (Monos), namesInScope_Inh_Expression :: (Names), orderedTypeSynonyms_Inh_Expression :: (OrderedTypeSynonyms), parentTree_Inh_Expression :: (InfoTree), patternMatchWarnings_Inh_Expression :: ([Warning]), substitution_Inh_Expression :: (FixpointSubstitution), tryPatterns_Inh_Expression :: ([(Expression , [String])]), typeschemeMap_Inh_Expression :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_Expression :: (Int), uniqueSecondRound_Inh_Expression :: (Int) }
data Syn_Expression = Syn_Expression { assumptions_Syn_Expression :: (Assumptions), beta_Syn_Expression :: (Tp), betaUnique_Syn_Expression :: (Int), collectErrors_Syn_Expression :: (TypeErrors), collectInstances_Syn_Expression :: ([(Name, Instance)]), collectWarnings_Syn_Expression :: (Warnings), constraints_Syn_Expression :: (ConstraintSet), counter_Syn_Expression :: (Int), dictionaryEnvironment_Syn_Expression :: (DictionaryEnvironment), infoTree_Syn_Expression :: (InfoTree), matchIO_Syn_Expression :: (IO ()), matches_Syn_Expression :: ([Maybe MetaVariableTable]), patternMatchWarnings_Syn_Expression :: ([Warning]), self_Syn_Expression :: (Expression), unboundNames_Syn_Expression :: (Names), uniqueChunk_Syn_Expression :: (Int), uniqueSecondRound_Syn_Expression :: (Int) }
wrap_Expression :: T_Expression -> Inh_Expression -> (Syn_Expression )
wrap_Expression (T_Expression act) (Inh_Expression _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound
(T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound) <- return (inv_Expression_s41 sem arg)
return (Syn_Expression _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound)
)
sem_Expression :: Expression -> T_Expression
sem_Expression ( Expression_Hole range_ id_ ) = sem_Expression_Hole ( sem_Range range_ ) id_
sem_Expression ( Expression_Feedback range_ feedback_ expression_ ) = sem_Expression_Feedback ( sem_Range range_ ) feedback_ ( sem_Expression expression_ )
sem_Expression ( Expression_MustUse range_ expression_ ) = sem_Expression_MustUse ( sem_Range range_ ) ( sem_Expression expression_ )
sem_Expression ( Expression_Literal range_ literal_ ) = sem_Expression_Literal ( sem_Range range_ ) ( sem_Literal literal_ )
sem_Expression ( Expression_Variable range_ name_ ) = sem_Expression_Variable ( sem_Range range_ ) ( sem_Name name_ )
sem_Expression ( Expression_Constructor range_ name_ ) = sem_Expression_Constructor ( sem_Range range_ ) ( sem_Name name_ )
sem_Expression ( Expression_Parenthesized range_ expression_ ) = sem_Expression_Parenthesized ( sem_Range range_ ) ( sem_Expression expression_ )
sem_Expression ( Expression_NormalApplication range_ function_ arguments_ ) = sem_Expression_NormalApplication ( sem_Range range_ ) ( sem_Expression function_ ) ( sem_Expressions arguments_ )
sem_Expression ( Expression_InfixApplication range_ leftExpression_ operator_ rightExpression_ ) = sem_Expression_InfixApplication ( sem_Range range_ ) ( sem_MaybeExpression leftExpression_ ) ( sem_Expression operator_ ) ( sem_MaybeExpression rightExpression_ )
sem_Expression ( Expression_If range_ guardExpression_ thenExpression_ elseExpression_ ) = sem_Expression_If ( sem_Range range_ ) ( sem_Expression guardExpression_ ) ( sem_Expression thenExpression_ ) ( sem_Expression elseExpression_ )
sem_Expression ( Expression_Lambda range_ patterns_ expression_ ) = sem_Expression_Lambda ( sem_Range range_ ) ( sem_Patterns patterns_ ) ( sem_Expression expression_ )
sem_Expression ( Expression_Case range_ expression_ alternatives_ ) = sem_Expression_Case ( sem_Range range_ ) ( sem_Expression expression_ ) ( sem_Alternatives alternatives_ )
sem_Expression ( Expression_Let range_ declarations_ expression_ ) = sem_Expression_Let ( sem_Range range_ ) ( sem_Declarations declarations_ ) ( sem_Expression expression_ )
sem_Expression ( Expression_Do range_ statements_ ) = sem_Expression_Do ( sem_Range range_ ) ( sem_Statements statements_ )
sem_Expression ( Expression_List range_ expressions_ ) = sem_Expression_List ( sem_Range range_ ) ( sem_Expressions expressions_ )
sem_Expression ( Expression_Tuple range_ expressions_ ) = sem_Expression_Tuple ( sem_Range range_ ) ( sem_Expressions expressions_ )
sem_Expression ( Expression_Comprehension range_ expression_ qualifiers_ ) = sem_Expression_Comprehension ( sem_Range range_ ) ( sem_Expression expression_ ) ( sem_Qualifiers qualifiers_ )
sem_Expression ( Expression_Typed range_ expression_ type_ ) = sem_Expression_Typed ( sem_Range range_ ) ( sem_Expression expression_ ) ( sem_Type type_ )
sem_Expression ( Expression_RecordConstruction range_ name_ recordExpressionBindings_ ) = sem_Expression_RecordConstruction ( sem_Range range_ ) ( sem_Name name_ ) ( sem_RecordExpressionBindings recordExpressionBindings_ )
sem_Expression ( Expression_RecordUpdate range_ expression_ recordExpressionBindings_ ) = sem_Expression_RecordUpdate ( sem_Range range_ ) ( sem_Expression expression_ ) ( sem_RecordExpressionBindings recordExpressionBindings_ )
sem_Expression ( Expression_Enum range_ from_ then_ to_ ) = sem_Expression_Enum ( sem_Range range_ ) ( sem_Expression from_ ) ( sem_MaybeExpression then_ ) ( sem_MaybeExpression to_ )
sem_Expression ( Expression_Negate range_ expression_ ) = sem_Expression_Negate ( sem_Range range_ ) ( sem_Expression expression_ )
sem_Expression ( Expression_NegateFloat range_ expression_ ) = sem_Expression_NegateFloat ( sem_Range range_ ) ( sem_Expression expression_ )
newtype T_Expression = T_Expression {
attach_T_Expression :: Identity (T_Expression_s41 )
}
newtype T_Expression_s41 = C_Expression_s41 {
inv_Expression_s41 :: (T_Expression_v40 )
}
data T_Expression_s42 = C_Expression_s42
type T_Expression_v40 = (T_Expression_vIn40 ) -> (T_Expression_vOut40 )
data T_Expression_vIn40 = T_Expression_vIn40 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) ([(Expression , [String])]) (M.Map Int (Scheme Predicates)) (Int) (Int)
data T_Expression_vOut40 = T_Expression_vOut40 (Assumptions) (Tp) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) (InfoTree) (IO ()) ([Maybe MetaVariableTable]) ([Warning]) (Expression) (Names) (Int) (Int)
sem_Expression_Hole :: T_Range -> (Integer) -> T_Expression
sem_Expression_Hole arg_range_ arg_id_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsObetaUnique :: Int
_lhsObetaUnique = rule752 _lhsIbetaUnique
_assumptions = rule753 ()
_constraints = rule754 ()
_beta = rule755 _lhsIbetaUnique
_localInfo = rule756 _beta _lhsImonos _self
_parentTree = rule757 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule758 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
((),_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule759 _assumptions _constraints _lhsIallPatterns _lhsItryPatterns _lhsIuniqueSecondRound _localInfo
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule760 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule761 ()
_self = rule762 _rangeIself arg_id_
_lhsOself :: Expression
_lhsOself = rule763 _self
_lhsObeta :: Tp
_lhsObeta = rule764 _beta
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule765 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule766 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule767 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule768 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule769 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule770 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule771 _lhsIuniqueChunk
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule752 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule753 = \ (_ :: ()) ->
noAssumptions
rule754 = \ (_ :: ()) ->
emptyTree
rule755 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule756 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule757 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule758 = \ _parentTree ->
_parentTree
rule759 = \ _assumptions _constraints ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) ((_lhsIuniqueSecondRound) :: Int) _localInfo ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in match0 infoTuple _lhsIuniqueSecondRound
(const Nothing)
_lhsItryPatterns _lhsIallPatterns
[]
rule760 = \ (_ :: ()) ->
[]
rule761 = \ (_ :: ()) ->
[]
rule762 = \ ((_rangeIself) :: Range) id_ ->
Expression_Hole _rangeIself id_
rule763 = \ _self ->
_self
rule764 = \ _beta ->
_beta
rule765 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule766 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule767 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule768 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule769 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule770 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule771 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Expression_Feedback :: T_Range -> (String) -> T_Expression -> T_Expression
sem_Expression_Feedback arg_range_ arg_feedback_ arg_expression_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule772 _expressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule773 _expressionIunboundNames
_self = rule774 _expressionIself _rangeIself arg_feedback_
_lhsOself :: Expression
_lhsOself = rule775 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule776 _expressionIassumptions
_lhsObeta :: Tp
_lhsObeta = rule777 _expressionIbeta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule778 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule779 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule780 _expressionIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule781 _expressionIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule782 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule783 _expressionIdictionaryEnvironment
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule784 _expressionIinfoTree
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule785 _expressionImatchIO
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule786 _expressionImatches
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule787 _expressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule788 _expressionIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule789 _expressionIuniqueSecondRound
_expressionOallPatterns = rule790 _lhsIallPatterns
_expressionOallTypeSchemes = rule791 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule792 _lhsIavailablePredicates
_expressionObetaUnique = rule793 _lhsIbetaUnique
_expressionOclassEnvironment = rule794 _lhsIclassEnvironment
_expressionOcollectErrors = rule795 _lhsIcollectErrors
_expressionOcollectWarnings = rule796 _lhsIcollectWarnings
_expressionOcounter = rule797 _lhsIcounter
_expressionOcurrentChunk = rule798 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule799 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule800 _lhsIimportEnvironment
_expressionOmatchIO = rule801 _lhsImatchIO
_expressionOmonos = rule802 _lhsImonos
_expressionOnamesInScope = rule803 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule804 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule805 _lhsIparentTree
_expressionOpatternMatchWarnings = rule806 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule807 _lhsIsubstitution
_expressionOtryPatterns = rule808 _lhsItryPatterns
_expressionOtypeschemeMap = rule809 _lhsItypeschemeMap
_expressionOuniqueChunk = rule810 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule811 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule772 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule773 = \ ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames
rule774 = \ ((_expressionIself) :: Expression) ((_rangeIself) :: Range) feedback_ ->
Expression_Feedback _rangeIself feedback_ _expressionIself
rule775 = \ _self ->
_self
rule776 = \ ((_expressionIassumptions) :: Assumptions) ->
_expressionIassumptions
rule777 = \ ((_expressionIbeta) :: Tp) ->
_expressionIbeta
rule778 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule779 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule780 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule781 = \ ((_expressionIconstraints) :: ConstraintSet) ->
_expressionIconstraints
rule782 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule783 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule784 = \ ((_expressionIinfoTree) :: InfoTree) ->
_expressionIinfoTree
rule785 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule786 = \ ((_expressionImatches) :: [Maybe MetaVariableTable]) ->
_expressionImatches
rule787 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule788 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule789 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule790 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule791 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule792 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule793 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule794 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule795 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule796 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule797 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule798 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule799 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule800 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule801 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule802 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule803 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule804 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule805 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule806 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule807 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule808 = \ ((_lhsItryPatterns) :: [(Expression , [String])]) ->
_lhsItryPatterns
rule809 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule810 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule811 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Expression_MustUse :: T_Range -> T_Expression -> T_Expression
sem_Expression_MustUse arg_range_ arg_expression_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule812 _expressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule813 _expressionIunboundNames
_self = rule814 _expressionIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule815 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule816 _expressionIassumptions
_lhsObeta :: Tp
_lhsObeta = rule817 _expressionIbeta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule818 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule819 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule820 _expressionIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule821 _expressionIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule822 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule823 _expressionIdictionaryEnvironment
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule824 _expressionIinfoTree
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule825 _expressionImatchIO
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule826 _expressionImatches
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule827 _expressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule828 _expressionIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule829 _expressionIuniqueSecondRound
_expressionOallPatterns = rule830 _lhsIallPatterns
_expressionOallTypeSchemes = rule831 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule832 _lhsIavailablePredicates
_expressionObetaUnique = rule833 _lhsIbetaUnique
_expressionOclassEnvironment = rule834 _lhsIclassEnvironment
_expressionOcollectErrors = rule835 _lhsIcollectErrors
_expressionOcollectWarnings = rule836 _lhsIcollectWarnings
_expressionOcounter = rule837 _lhsIcounter
_expressionOcurrentChunk = rule838 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule839 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule840 _lhsIimportEnvironment
_expressionOmatchIO = rule841 _lhsImatchIO
_expressionOmonos = rule842 _lhsImonos
_expressionOnamesInScope = rule843 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule844 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule845 _lhsIparentTree
_expressionOpatternMatchWarnings = rule846 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule847 _lhsIsubstitution
_expressionOtryPatterns = rule848 _lhsItryPatterns
_expressionOtypeschemeMap = rule849 _lhsItypeschemeMap
_expressionOuniqueChunk = rule850 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule851 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule812 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule813 = \ ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames
rule814 = \ ((_expressionIself) :: Expression) ((_rangeIself) :: Range) ->
Expression_MustUse _rangeIself _expressionIself
rule815 = \ _self ->
_self
rule816 = \ ((_expressionIassumptions) :: Assumptions) ->
_expressionIassumptions
rule817 = \ ((_expressionIbeta) :: Tp) ->
_expressionIbeta
rule818 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule819 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule820 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule821 = \ ((_expressionIconstraints) :: ConstraintSet) ->
_expressionIconstraints
rule822 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule823 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule824 = \ ((_expressionIinfoTree) :: InfoTree) ->
_expressionIinfoTree
rule825 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule826 = \ ((_expressionImatches) :: [Maybe MetaVariableTable]) ->
_expressionImatches
rule827 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule828 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule829 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule830 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule831 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule832 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule833 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule834 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule835 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule836 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule837 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule838 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule839 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule840 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule841 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule842 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule843 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule844 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule845 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule846 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule847 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule848 = \ ((_lhsItryPatterns) :: [(Expression , [String])]) ->
_lhsItryPatterns
rule849 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule850 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule851 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Expression_Literal :: T_Range -> T_Literal -> T_Expression
sem_Expression_Literal arg_range_ arg_literal_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_literalX86 = Control.Monad.Identity.runIdentity (attach_T_Literal (arg_literal_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Literal_vOut85 _literalIelements _literalIliteralType _literalIself) = inv_Literal_s86 _literalX86 (T_Literal_vIn85 )
_lhsObetaUnique :: Int
_lhsObetaUnique = rule852 _lhsIbetaUnique
_assumptions = rule853 ()
_constraints = rule854 _beta _cinfo _literalIliteralType
_beta = rule855 _lhsIbetaUnique
_cinfo = rule856 _parentTree
_localInfo = rule857 _beta _lhsImonos _self
_parentTree = rule858 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule859 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
((),_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule860 _assumptions _constraints _lhsIallPatterns _lhsItryPatterns _lhsIuniqueSecondRound _literalIself _localInfo
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule861 _ioMatch _lhsImatchIO
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule862 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule863 ()
_self = rule864 _literalIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule865 _self
_lhsObeta :: Tp
_lhsObeta = rule866 _beta
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule867 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule868 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule869 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule870 _lhsIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule871 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule872 _lhsIuniqueChunk
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule852 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule853 = \ (_ :: ()) ->
noAssumptions
rule854 = \ _beta _cinfo ((_literalIliteralType) :: Tp) ->
unitTree ((_literalIliteralType .==. _beta) _cinfo)
rule855 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule856 = \ _parentTree ->
resultConstraint "literal" _parentTree
[ FolkloreConstraint, HasTrustFactor 10.0 ]
rule857 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule858 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule859 = \ _parentTree ->
_parentTree
rule860 = \ _assumptions _constraints ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) ((_lhsIuniqueSecondRound) :: Int) ((_literalIself) :: Literal) _localInfo ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in match0 infoTuple _lhsIuniqueSecondRound
(match_Expression_Literal _literalIself)
_lhsItryPatterns _lhsIallPatterns
[]
rule861 = \ _ioMatch ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO >> _ioMatch
rule862 = \ (_ :: ()) ->
[]
rule863 = \ (_ :: ()) ->
[]
rule864 = \ ((_literalIself) :: Literal) ((_rangeIself) :: Range) ->
Expression_Literal _rangeIself _literalIself
rule865 = \ _self ->
_self
rule866 = \ _beta ->
_beta
rule867 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule868 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule869 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule870 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule871 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule872 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Expression_Variable :: T_Range -> T_Name -> T_Expression
sem_Expression_Variable arg_range_ arg_name_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_lhsObetaUnique :: Int
_lhsObetaUnique = rule873 _lhsIbetaUnique
_assumptions = rule874 _beta _nameIself
_constraints = rule875 _lhsIbetaUnique
_beta = rule876 _lhsIbetaUnique
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule877 _newDEnv
_nameInScope = rule878 _lhsInamesInScope _nameIself
_maybeInferredType = rule879 _lhsIallTypeSchemes _nameInScope
_requiredDictionaries = rule880 _lhsIimportEnvironment _lhsIsubstitution _maybeInferredType _usedAsType
_newDEnv = rule881 _lhsIavailablePredicates _lhsIclassEnvironment _lhsIdictionaryEnvironment _lhsIsubstitution _nameIself _requiredDictionaries
_usedAsType = rule882 _beta _lhsIsubstitution
_localInfo = rule883 _beta _lhsImonos _self
_parentTree = rule884 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule885 _parentTree
_lhsOunboundNames :: Names
_lhsOunboundNames = rule886 _nameIself
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
((),_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule887 _assumptions _constraints _lhsIallPatterns _lhsItryPatterns _lhsIuniqueSecondRound _localInfo _nameIself
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule888 _ioMatch _lhsImatchIO
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule889 ()
_self = rule890 _nameIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule891 _self
_lhsObeta :: Tp
_lhsObeta = rule892 _beta
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule893 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule894 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule895 _lhsIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule896 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule897 _lhsIuniqueChunk
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule873 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule874 = \ _beta ((_nameIself) :: Name) ->
_nameIself `single` _beta
rule875 = \ ((_lhsIbetaUnique) :: Int) ->
Node [ Receive _lhsIbetaUnique ]
rule876 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule877 = \ _newDEnv ->
_newDEnv
rule878 = \ ((_lhsInamesInScope) :: Names) ((_nameIself) :: Name) ->
case filter (_nameIself==) _lhsInamesInScope of
[name] -> NameWithRange name
_ -> internalError "TypeInferenceOverloading.ag" "n/a" "name not in scope"
rule879 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) _nameInScope ->
M.lookup _nameInScope _lhsIallTypeSchemes
rule880 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) _maybeInferredType _usedAsType ->
case _maybeInferredType of
Nothing -> []
Just scheme -> getRequiredDictionaries
(getOrderedTypeSynonyms _lhsIimportEnvironment)
(_lhsIsubstitution |-> _usedAsType)
(_lhsIsubstitution |-> scheme)
rule881 = \ ((_lhsIavailablePredicates) :: Predicates) ((_lhsIclassEnvironment) :: ClassEnvironment) ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) ((_nameIself) :: Name) _requiredDictionaries ->
resolveOverloading (_lhsIclassEnvironment)
_nameIself
(_lhsIsubstitution |-> _lhsIavailablePredicates)
(_lhsIsubstitution |-> _requiredDictionaries)
_lhsIdictionaryEnvironment
rule882 = \ _beta ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution |-> _beta
rule883 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule884 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule885 = \ _parentTree ->
_parentTree
rule886 = \ ((_nameIself) :: Name) ->
[ _nameIself ]
rule887 = \ _assumptions _constraints ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) ((_lhsIuniqueSecondRound) :: Int) _localInfo ((_nameIself) :: Name) ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in match0 infoTuple _lhsIuniqueSecondRound
(match_Expression_Variable _nameIself)
_lhsItryPatterns _lhsIallPatterns
[]
rule888 = \ _ioMatch ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO >> _ioMatch
rule889 = \ (_ :: ()) ->
[]
rule890 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Expression_Variable _rangeIself _nameIself
rule891 = \ _self ->
_self
rule892 = \ _beta ->
_beta
rule893 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule894 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule895 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule896 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule897 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Expression_Constructor :: T_Range -> T_Name -> T_Expression
sem_Expression_Constructor arg_range_ arg_name_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_lhsObetaUnique :: Int
_lhsObetaUnique = rule898 _lhsIbetaUnique
_assumptions = rule899 ()
_constraints = rule900 _newcon
_beta = rule901 _lhsIbetaUnique
_newcon = rule902 _beta _cinfo _lhsIimportEnvironment _nameIself
_cinfo = rule903 _nameIself _parentTree
_localInfo = rule904 _beta _lhsImonos _self
_parentTree = rule905 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule906 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
((),_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule907 _assumptions _constraints _lhsIallPatterns _lhsItryPatterns _lhsIuniqueSecondRound _localInfo _nameIself
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule908 _ioMatch _lhsImatchIO
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule909 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule910 ()
_self = rule911 _nameIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule912 _self
_lhsObeta :: Tp
_lhsObeta = rule913 _beta
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule914 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule915 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule916 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule917 _lhsIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule918 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule919 _lhsIuniqueChunk
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule898 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule899 = \ (_ :: ()) ->
noAssumptions
rule900 = \ _newcon ->
listTree _newcon
rule901 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule902 = \ _beta _cinfo ((_lhsIimportEnvironment) :: ImportEnvironment) ((_nameIself) :: Name) ->
case M.lookup _nameIself (valueConstructors _lhsIimportEnvironment) of
Nothing -> []
Just ctp -> [ (_beta .::. ctp) _cinfo ]
rule903 = \ ((_nameIself) :: Name) _parentTree ->
resultConstraint "constructor" _parentTree
[ FolkloreConstraint, HasTrustFactor 10.0, IsImported _nameIself ]
rule904 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule905 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule906 = \ _parentTree ->
_parentTree
rule907 = \ _assumptions _constraints ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) ((_lhsIuniqueSecondRound) :: Int) _localInfo ((_nameIself) :: Name) ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in match0 infoTuple _lhsIuniqueSecondRound
(match_Expression_Constructor _nameIself)
_lhsItryPatterns _lhsIallPatterns
[]
rule908 = \ _ioMatch ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO >> _ioMatch
rule909 = \ (_ :: ()) ->
[]
rule910 = \ (_ :: ()) ->
[]
rule911 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Expression_Constructor _rangeIself _nameIself
rule912 = \ _self ->
_self
rule913 = \ _beta ->
_beta
rule914 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule915 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule916 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule917 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule918 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule919 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Expression_Parenthesized :: T_Range -> T_Expression -> T_Expression
sem_Expression_Parenthesized arg_range_ arg_expression_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule920 _expressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule921 _expressionIunboundNames
_self = rule922 _expressionIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule923 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule924 _expressionIassumptions
_lhsObeta :: Tp
_lhsObeta = rule925 _expressionIbeta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule926 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule927 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule928 _expressionIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule929 _expressionIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule930 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule931 _expressionIdictionaryEnvironment
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule932 _expressionIinfoTree
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule933 _expressionImatchIO
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule934 _expressionImatches
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule935 _expressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule936 _expressionIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule937 _expressionIuniqueSecondRound
_expressionOallPatterns = rule938 _lhsIallPatterns
_expressionOallTypeSchemes = rule939 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule940 _lhsIavailablePredicates
_expressionObetaUnique = rule941 _lhsIbetaUnique
_expressionOclassEnvironment = rule942 _lhsIclassEnvironment
_expressionOcollectErrors = rule943 _lhsIcollectErrors
_expressionOcollectWarnings = rule944 _lhsIcollectWarnings
_expressionOcounter = rule945 _lhsIcounter
_expressionOcurrentChunk = rule946 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule947 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule948 _lhsIimportEnvironment
_expressionOmatchIO = rule949 _lhsImatchIO
_expressionOmonos = rule950 _lhsImonos
_expressionOnamesInScope = rule951 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule952 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule953 _lhsIparentTree
_expressionOpatternMatchWarnings = rule954 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule955 _lhsIsubstitution
_expressionOtryPatterns = rule956 _lhsItryPatterns
_expressionOtypeschemeMap = rule957 _lhsItypeschemeMap
_expressionOuniqueChunk = rule958 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule959 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule920 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule921 = \ ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames
rule922 = \ ((_expressionIself) :: Expression) ((_rangeIself) :: Range) ->
Expression_Parenthesized _rangeIself _expressionIself
rule923 = \ _self ->
_self
rule924 = \ ((_expressionIassumptions) :: Assumptions) ->
_expressionIassumptions
rule925 = \ ((_expressionIbeta) :: Tp) ->
_expressionIbeta
rule926 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule927 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule928 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule929 = \ ((_expressionIconstraints) :: ConstraintSet) ->
_expressionIconstraints
rule930 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule931 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule932 = \ ((_expressionIinfoTree) :: InfoTree) ->
_expressionIinfoTree
rule933 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule934 = \ ((_expressionImatches) :: [Maybe MetaVariableTable]) ->
_expressionImatches
rule935 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule936 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule937 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule938 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule939 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule940 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule941 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule942 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule943 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule944 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule945 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule946 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule947 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule948 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule949 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule950 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule951 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule952 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule953 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule954 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule955 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule956 = \ ((_lhsItryPatterns) :: [(Expression , [String])]) ->
_lhsItryPatterns
rule957 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule958 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule959 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Expression_NormalApplication :: T_Range -> T_Expression -> T_Expressions -> T_Expression
sem_Expression_NormalApplication arg_range_ arg_function_ arg_arguments_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_functionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_function_))
_argumentsX44 = Control.Monad.Identity.runIdentity (attach_T_Expressions (arg_arguments_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _functionIassumptions _functionIbeta _functionIbetaUnique _functionIcollectErrors _functionIcollectInstances _functionIcollectWarnings _functionIconstraints _functionIcounter _functionIdictionaryEnvironment _functionIinfoTree _functionImatchIO _functionImatches _functionIpatternMatchWarnings _functionIself _functionIunboundNames _functionIuniqueChunk _functionIuniqueSecondRound) = inv_Expression_s41 _functionX41 (T_Expression_vIn40 _functionOallPatterns _functionOallTypeSchemes _functionOavailablePredicates _functionObetaUnique _functionOclassEnvironment _functionOcollectErrors _functionOcollectWarnings _functionOcounter _functionOcurrentChunk _functionOdictionaryEnvironment _functionOimportEnvironment _functionOmatchIO _functionOmonos _functionOnamesInScope _functionOorderedTypeSynonyms _functionOparentTree _functionOpatternMatchWarnings _functionOsubstitution _functionOtryPatterns _functionOtypeschemeMap _functionOuniqueChunk _functionOuniqueSecondRound)
(T_Expressions_vOut43 _argumentsIassumptions _argumentsIbetaUnique _argumentsIbetas _argumentsIcollectErrors _argumentsIcollectInstances _argumentsIcollectWarnings _argumentsIconstraintslist _argumentsIcounter _argumentsIdictionaryEnvironment _argumentsIinfoTrees _argumentsImatchIO _argumentsImatches _argumentsIpatternMatchWarnings _argumentsIself _argumentsIunboundNames _argumentsIuniqueChunk _argumentsIuniqueSecondRound) = inv_Expressions_s44 _argumentsX44 (T_Expressions_vIn43 _argumentsOallPatterns _argumentsOallTypeSchemes _argumentsOavailablePredicates _argumentsObetaUnique _argumentsOclassEnvironment _argumentsOcollectErrors _argumentsOcollectWarnings _argumentsOcounter _argumentsOcurrentChunk _argumentsOdictionaryEnvironment _argumentsOimportEnvironment _argumentsOmatchIO _argumentsOmonos _argumentsOnamesInScope _argumentsOorderedTypeSynonyms _argumentsOparentTree _argumentsOpatternMatchWarnings _argumentsOsubstitution _argumentsOtryPatterns _argumentsOtypeschemeMap _argumentsOuniqueChunk _argumentsOuniqueSecondRound)
_functionObetaUnique = rule960 _lhsIbetaUnique
_assumptions = rule961 _argumentsIassumptions _functionIassumptions
_constraints = rule962 _argumentsIconstraintslist _functionIconstraints _newcon
_beta = rule963 _lhsIbetaUnique
_newcon = rule964 _argumentsIbetas _beta _cinfo _functionIbeta
_cinfo = rule965 _argumentsIinfoTrees _parentTree
_localInfo = rule966 _beta _lhsImonos _self
_parentTree = rule967 _argumentsIinfoTrees _functionIinfoTree _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule968 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
((_functionOtryPatterns,_argumentsOtryPatterns),_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule969 _argumentsImatches _argumentsIuniqueSecondRound _assumptions _constraints _functionImatches _lhsIallPatterns _lhsItryPatterns _localInfo
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule970 _argumentsImatchIO _ioMatch
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule971 _argumentsIcollectInstances _functionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule972 _argumentsIunboundNames _functionIunboundNames
_self = rule973 _argumentsIself _functionIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule974 _self
_lhsObeta :: Tp
_lhsObeta = rule975 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule976 _argumentsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule977 _argumentsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule978 _argumentsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule979 _argumentsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule980 _argumentsIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule981 _argumentsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule982 _argumentsIuniqueChunk
_functionOallPatterns = rule983 _lhsIallPatterns
_functionOallTypeSchemes = rule984 _lhsIallTypeSchemes
_functionOavailablePredicates = rule985 _lhsIavailablePredicates
_functionOclassEnvironment = rule986 _lhsIclassEnvironment
_functionOcollectErrors = rule987 _lhsIcollectErrors
_functionOcollectWarnings = rule988 _lhsIcollectWarnings
_functionOcounter = rule989 _lhsIcounter
_functionOcurrentChunk = rule990 _lhsIcurrentChunk
_functionOdictionaryEnvironment = rule991 _lhsIdictionaryEnvironment
_functionOimportEnvironment = rule992 _lhsIimportEnvironment
_functionOmatchIO = rule993 _lhsImatchIO
_functionOmonos = rule994 _lhsImonos
_functionOnamesInScope = rule995 _lhsInamesInScope
_functionOorderedTypeSynonyms = rule996 _lhsIorderedTypeSynonyms
_functionOparentTree = rule997 _parentTree
_functionOpatternMatchWarnings = rule998 _lhsIpatternMatchWarnings
_functionOsubstitution = rule999 _lhsIsubstitution
_functionOtypeschemeMap = rule1000 _lhsItypeschemeMap
_functionOuniqueChunk = rule1001 _lhsIuniqueChunk
_functionOuniqueSecondRound = rule1002 _lhsIuniqueSecondRound
_argumentsOallPatterns = rule1003 _lhsIallPatterns
_argumentsOallTypeSchemes = rule1004 _lhsIallTypeSchemes
_argumentsOavailablePredicates = rule1005 _lhsIavailablePredicates
_argumentsObetaUnique = rule1006 _functionIbetaUnique
_argumentsOclassEnvironment = rule1007 _lhsIclassEnvironment
_argumentsOcollectErrors = rule1008 _functionIcollectErrors
_argumentsOcollectWarnings = rule1009 _functionIcollectWarnings
_argumentsOcounter = rule1010 _functionIcounter
_argumentsOcurrentChunk = rule1011 _lhsIcurrentChunk
_argumentsOdictionaryEnvironment = rule1012 _functionIdictionaryEnvironment
_argumentsOimportEnvironment = rule1013 _lhsIimportEnvironment
_argumentsOmatchIO = rule1014 _functionImatchIO
_argumentsOmonos = rule1015 _lhsImonos
_argumentsOnamesInScope = rule1016 _lhsInamesInScope
_argumentsOorderedTypeSynonyms = rule1017 _lhsIorderedTypeSynonyms
_argumentsOparentTree = rule1018 _parentTree
_argumentsOpatternMatchWarnings = rule1019 _functionIpatternMatchWarnings
_argumentsOsubstitution = rule1020 _lhsIsubstitution
_argumentsOtypeschemeMap = rule1021 _lhsItypeschemeMap
_argumentsOuniqueChunk = rule1022 _functionIuniqueChunk
_argumentsOuniqueSecondRound = rule1023 _functionIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule960 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule961 = \ ((_argumentsIassumptions) :: Assumptions) ((_functionIassumptions) :: Assumptions) ->
_functionIassumptions `combine` _argumentsIassumptions
rule962 = \ ((_argumentsIconstraintslist) :: ConstraintSets) ((_functionIconstraints) :: ConstraintSet) _newcon ->
_newcon .>.
Node [ _functionIconstraints
, Node _argumentsIconstraintslist
]
rule963 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule964 = \ ((_argumentsIbetas) :: Tps) _beta _cinfo ((_functionIbeta) :: Tp) ->
[ (_functionIbeta .==. foldr (.->.) _beta _argumentsIbetas) _cinfo ]
rule965 = \ ((_argumentsIinfoTrees) :: InfoTrees) _parentTree ->
childConstraint 0 "application" _parentTree
[ ApplicationEdge False (map attribute _argumentsIinfoTrees) ]
rule966 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule967 = \ ((_argumentsIinfoTrees) :: InfoTrees) ((_functionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo (_functionIinfoTree : _argumentsIinfoTrees)
rule968 = \ _parentTree ->
_parentTree
rule969 = \ ((_argumentsImatches) :: [Maybe MetaVariableTable]) ((_argumentsIuniqueSecondRound) :: Int) _assumptions _constraints ((_functionImatches) :: [Maybe MetaVariableTable]) ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in match2 infoTuple _argumentsIuniqueSecondRound
match_Expression_NormalApplication
_lhsItryPatterns _lhsIallPatterns
[_functionImatches, _argumentsImatches]
rule970 = \ ((_argumentsImatchIO) :: IO ()) _ioMatch ->
_argumentsImatchIO >> _ioMatch
rule971 = \ ((_argumentsIcollectInstances) :: [(Name, Instance)]) ((_functionIcollectInstances) :: [(Name, Instance)]) ->
_functionIcollectInstances ++ _argumentsIcollectInstances
rule972 = \ ((_argumentsIunboundNames) :: Names) ((_functionIunboundNames) :: Names) ->
_functionIunboundNames ++ _argumentsIunboundNames
rule973 = \ ((_argumentsIself) :: Expressions) ((_functionIself) :: Expression) ((_rangeIself) :: Range) ->
Expression_NormalApplication _rangeIself _functionIself _argumentsIself
rule974 = \ _self ->
_self
rule975 = \ _beta ->
_beta
rule976 = \ ((_argumentsIbetaUnique) :: Int) ->
_argumentsIbetaUnique
rule977 = \ ((_argumentsIcollectErrors) :: TypeErrors) ->
_argumentsIcollectErrors
rule978 = \ ((_argumentsIcollectWarnings) :: Warnings) ->
_argumentsIcollectWarnings
rule979 = \ ((_argumentsIcounter) :: Int) ->
_argumentsIcounter
rule980 = \ ((_argumentsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_argumentsIdictionaryEnvironment
rule981 = \ ((_argumentsIpatternMatchWarnings) :: [Warning]) ->
_argumentsIpatternMatchWarnings
rule982 = \ ((_argumentsIuniqueChunk) :: Int) ->
_argumentsIuniqueChunk
rule983 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule984 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule985 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule986 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule987 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule988 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule989 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule990 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule991 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule992 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule993 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule994 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule995 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule996 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule997 = \ _parentTree ->
_parentTree
rule998 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule999 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1000 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1001 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1002 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule1003 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1004 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1005 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1006 = \ ((_functionIbetaUnique) :: Int) ->
_functionIbetaUnique
rule1007 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1008 = \ ((_functionIcollectErrors) :: TypeErrors) ->
_functionIcollectErrors
rule1009 = \ ((_functionIcollectWarnings) :: Warnings) ->
_functionIcollectWarnings
rule1010 = \ ((_functionIcounter) :: Int) ->
_functionIcounter
rule1011 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1012 = \ ((_functionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_functionIdictionaryEnvironment
rule1013 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1014 = \ ((_functionImatchIO) :: IO ()) ->
_functionImatchIO
rule1015 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1016 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1017 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1018 = \ _parentTree ->
_parentTree
rule1019 = \ ((_functionIpatternMatchWarnings) :: [Warning]) ->
_functionIpatternMatchWarnings
rule1020 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1021 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1022 = \ ((_functionIuniqueChunk) :: Int) ->
_functionIuniqueChunk
rule1023 = \ ((_functionIuniqueSecondRound) :: Int) ->
_functionIuniqueSecondRound
sem_Expression_InfixApplication :: T_Range -> T_MaybeExpression -> T_Expression -> T_MaybeExpression -> T_Expression
sem_Expression_InfixApplication arg_range_ arg_leftExpression_ arg_operator_ arg_rightExpression_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_leftExpressionX95 = Control.Monad.Identity.runIdentity (attach_T_MaybeExpression (arg_leftExpression_))
_operatorX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_operator_))
_rightExpressionX95 = Control.Monad.Identity.runIdentity (attach_T_MaybeExpression (arg_rightExpression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_MaybeExpression_vOut94 _leftExpressionIassumptions _leftExpressionIbeta _leftExpressionIbetaUnique _leftExpressionIcollectErrors _leftExpressionIcollectInstances _leftExpressionIcollectWarnings _leftExpressionIconstraints _leftExpressionIcounter _leftExpressionIdictionaryEnvironment _leftExpressionIinfoTrees _leftExpressionImatchIO _leftExpressionImatches _leftExpressionIpatternMatchWarnings _leftExpressionIsection _leftExpressionIself _leftExpressionIunboundNames _leftExpressionIuniqueChunk _leftExpressionIuniqueSecondRound) = inv_MaybeExpression_s95 _leftExpressionX95 (T_MaybeExpression_vIn94 _leftExpressionOallPatterns _leftExpressionOallTypeSchemes _leftExpressionOavailablePredicates _leftExpressionObetaUnique _leftExpressionOclassEnvironment _leftExpressionOcollectErrors _leftExpressionOcollectWarnings _leftExpressionOcounter _leftExpressionOcurrentChunk _leftExpressionOdictionaryEnvironment _leftExpressionOimportEnvironment _leftExpressionOmatchIO _leftExpressionOmonos _leftExpressionOnamesInScope _leftExpressionOorderedTypeSynonyms _leftExpressionOparentTree _leftExpressionOpatternMatchWarnings _leftExpressionOsubstitution _leftExpressionOtryPatterns _leftExpressionOtypeschemeMap _leftExpressionOuniqueChunk _leftExpressionOuniqueSecondRound)
(T_Expression_vOut40 _operatorIassumptions _operatorIbeta _operatorIbetaUnique _operatorIcollectErrors _operatorIcollectInstances _operatorIcollectWarnings _operatorIconstraints _operatorIcounter _operatorIdictionaryEnvironment _operatorIinfoTree _operatorImatchIO _operatorImatches _operatorIpatternMatchWarnings _operatorIself _operatorIunboundNames _operatorIuniqueChunk _operatorIuniqueSecondRound) = inv_Expression_s41 _operatorX41 (T_Expression_vIn40 _operatorOallPatterns _operatorOallTypeSchemes _operatorOavailablePredicates _operatorObetaUnique _operatorOclassEnvironment _operatorOcollectErrors _operatorOcollectWarnings _operatorOcounter _operatorOcurrentChunk _operatorOdictionaryEnvironment _operatorOimportEnvironment _operatorOmatchIO _operatorOmonos _operatorOnamesInScope _operatorOorderedTypeSynonyms _operatorOparentTree _operatorOpatternMatchWarnings _operatorOsubstitution _operatorOtryPatterns _operatorOtypeschemeMap _operatorOuniqueChunk _operatorOuniqueSecondRound)
(T_MaybeExpression_vOut94 _rightExpressionIassumptions _rightExpressionIbeta _rightExpressionIbetaUnique _rightExpressionIcollectErrors _rightExpressionIcollectInstances _rightExpressionIcollectWarnings _rightExpressionIconstraints _rightExpressionIcounter _rightExpressionIdictionaryEnvironment _rightExpressionIinfoTrees _rightExpressionImatchIO _rightExpressionImatches _rightExpressionIpatternMatchWarnings _rightExpressionIsection _rightExpressionIself _rightExpressionIunboundNames _rightExpressionIuniqueChunk _rightExpressionIuniqueSecondRound) = inv_MaybeExpression_s95 _rightExpressionX95 (T_MaybeExpression_vIn94 _rightExpressionOallPatterns _rightExpressionOallTypeSchemes _rightExpressionOavailablePredicates _rightExpressionObetaUnique _rightExpressionOclassEnvironment _rightExpressionOcollectErrors _rightExpressionOcollectWarnings _rightExpressionOcounter _rightExpressionOcurrentChunk _rightExpressionOdictionaryEnvironment _rightExpressionOimportEnvironment _rightExpressionOmatchIO _rightExpressionOmonos _rightExpressionOnamesInScope _rightExpressionOorderedTypeSynonyms _rightExpressionOparentTree _rightExpressionOpatternMatchWarnings _rightExpressionOsubstitution _rightExpressionOtryPatterns _rightExpressionOtypeschemeMap _rightExpressionOuniqueChunk _rightExpressionOuniqueSecondRound)
_leftExpressionObetaUnique = rule1024 _lhsIbetaUnique
_assumptions = rule1025 _leftExpressionIassumptions _operatorIassumptions _rightExpressionIassumptions
_constraints = rule1026 _conTotal _leftExpressionIconstraints _operatorIconstraints _rightExpressionIconstraints
_beta = rule1027 _lhsIbetaUnique
_betaResOp = rule1028 _lhsIbetaUnique
_conOperator = rule1029 _betaResOp _cinfoOperator _leftExpressionIbeta _operatorIbeta _rightExpressionIbeta
_conTotal = rule1030 _beta _betaResOp _cinfoComplete _cinfoEmpty _cinfoLeftSection _cinfoRightSection _conOperator _leftExpressionIbeta _leftExpressionIsection _operatorIbeta _rightExpressionIbeta _rightExpressionIsection
_operatorNr = rule1031 _leftExpressionIinfoTrees
_cinfoOperator = rule1032 _leftExpressionIinfoTrees _leftExpressionIsection _operatorNr _parentTree _rightExpressionIinfoTrees _rightExpressionIsection
_cinfoComplete = rule1033 _localInfo _parentTree
_cinfoLeftSection = rule1034 _localInfo _parentTree
_cinfoRightSection = rule1035 _localInfo _parentTree
_cinfoEmpty = rule1036 _localInfo _parentTree
_localInfo = rule1037 _beta _lhsImonos _self
_parentTree = rule1038 _leftExpressionIinfoTrees _lhsIparentTree _localInfo _operatorIinfoTree _rightExpressionIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1039 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
((_leftExpressionOtryPatterns,_operatorOtryPatterns,_rightExpressionOtryPatterns),_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule1040 _assumptions _constraints _leftExpressionImatches _lhsIallPatterns _lhsItryPatterns _localInfo _operatorImatches _rightExpressionImatches _rightExpressionIuniqueSecondRound
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1041 _ioMatch _rightExpressionImatchIO
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1042 _leftExpressionIcollectInstances _operatorIcollectInstances _rightExpressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1043 _leftExpressionIunboundNames _operatorIunboundNames _rightExpressionIunboundNames
_self = rule1044 _leftExpressionIself _operatorIself _rangeIself _rightExpressionIself
_lhsOself :: Expression
_lhsOself = rule1045 _self
_lhsObeta :: Tp
_lhsObeta = rule1046 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1047 _rightExpressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1048 _rightExpressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1049 _rightExpressionIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule1050 _rightExpressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1051 _rightExpressionIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1052 _rightExpressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1053 _rightExpressionIuniqueChunk
_leftExpressionOallPatterns = rule1054 _lhsIallPatterns
_leftExpressionOallTypeSchemes = rule1055 _lhsIallTypeSchemes
_leftExpressionOavailablePredicates = rule1056 _lhsIavailablePredicates
_leftExpressionOclassEnvironment = rule1057 _lhsIclassEnvironment
_leftExpressionOcollectErrors = rule1058 _lhsIcollectErrors
_leftExpressionOcollectWarnings = rule1059 _lhsIcollectWarnings
_leftExpressionOcounter = rule1060 _lhsIcounter
_leftExpressionOcurrentChunk = rule1061 _lhsIcurrentChunk
_leftExpressionOdictionaryEnvironment = rule1062 _lhsIdictionaryEnvironment
_leftExpressionOimportEnvironment = rule1063 _lhsIimportEnvironment
_leftExpressionOmatchIO = rule1064 _lhsImatchIO
_leftExpressionOmonos = rule1065 _lhsImonos
_leftExpressionOnamesInScope = rule1066 _lhsInamesInScope
_leftExpressionOorderedTypeSynonyms = rule1067 _lhsIorderedTypeSynonyms
_leftExpressionOparentTree = rule1068 _parentTree
_leftExpressionOpatternMatchWarnings = rule1069 _lhsIpatternMatchWarnings
_leftExpressionOsubstitution = rule1070 _lhsIsubstitution
_leftExpressionOtypeschemeMap = rule1071 _lhsItypeschemeMap
_leftExpressionOuniqueChunk = rule1072 _lhsIuniqueChunk
_leftExpressionOuniqueSecondRound = rule1073 _lhsIuniqueSecondRound
_operatorOallPatterns = rule1074 _lhsIallPatterns
_operatorOallTypeSchemes = rule1075 _lhsIallTypeSchemes
_operatorOavailablePredicates = rule1076 _lhsIavailablePredicates
_operatorObetaUnique = rule1077 _leftExpressionIbetaUnique
_operatorOclassEnvironment = rule1078 _lhsIclassEnvironment
_operatorOcollectErrors = rule1079 _leftExpressionIcollectErrors
_operatorOcollectWarnings = rule1080 _leftExpressionIcollectWarnings
_operatorOcounter = rule1081 _leftExpressionIcounter
_operatorOcurrentChunk = rule1082 _lhsIcurrentChunk
_operatorOdictionaryEnvironment = rule1083 _leftExpressionIdictionaryEnvironment
_operatorOimportEnvironment = rule1084 _lhsIimportEnvironment
_operatorOmatchIO = rule1085 _leftExpressionImatchIO
_operatorOmonos = rule1086 _lhsImonos
_operatorOnamesInScope = rule1087 _lhsInamesInScope
_operatorOorderedTypeSynonyms = rule1088 _lhsIorderedTypeSynonyms
_operatorOparentTree = rule1089 _parentTree
_operatorOpatternMatchWarnings = rule1090 _leftExpressionIpatternMatchWarnings
_operatorOsubstitution = rule1091 _lhsIsubstitution
_operatorOtypeschemeMap = rule1092 _lhsItypeschemeMap
_operatorOuniqueChunk = rule1093 _leftExpressionIuniqueChunk
_operatorOuniqueSecondRound = rule1094 _leftExpressionIuniqueSecondRound
_rightExpressionOallPatterns = rule1095 _lhsIallPatterns
_rightExpressionOallTypeSchemes = rule1096 _lhsIallTypeSchemes
_rightExpressionOavailablePredicates = rule1097 _lhsIavailablePredicates
_rightExpressionObetaUnique = rule1098 _operatorIbetaUnique
_rightExpressionOclassEnvironment = rule1099 _lhsIclassEnvironment
_rightExpressionOcollectErrors = rule1100 _operatorIcollectErrors
_rightExpressionOcollectWarnings = rule1101 _operatorIcollectWarnings
_rightExpressionOcounter = rule1102 _operatorIcounter
_rightExpressionOcurrentChunk = rule1103 _lhsIcurrentChunk
_rightExpressionOdictionaryEnvironment = rule1104 _operatorIdictionaryEnvironment
_rightExpressionOimportEnvironment = rule1105 _lhsIimportEnvironment
_rightExpressionOmatchIO = rule1106 _operatorImatchIO
_rightExpressionOmonos = rule1107 _lhsImonos
_rightExpressionOnamesInScope = rule1108 _lhsInamesInScope
_rightExpressionOorderedTypeSynonyms = rule1109 _lhsIorderedTypeSynonyms
_rightExpressionOparentTree = rule1110 _parentTree
_rightExpressionOpatternMatchWarnings = rule1111 _operatorIpatternMatchWarnings
_rightExpressionOsubstitution = rule1112 _lhsIsubstitution
_rightExpressionOtypeschemeMap = rule1113 _lhsItypeschemeMap
_rightExpressionOuniqueChunk = rule1114 _operatorIuniqueChunk
_rightExpressionOuniqueSecondRound = rule1115 _operatorIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1024 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 2
rule1025 = \ ((_leftExpressionIassumptions) :: Assumptions) ((_operatorIassumptions) :: Assumptions) ((_rightExpressionIassumptions) :: Assumptions) ->
_leftExpressionIassumptions `combine` _operatorIassumptions `combine` _rightExpressionIassumptions
rule1026 = \ _conTotal ((_leftExpressionIconstraints) :: ConstraintSet) ((_operatorIconstraints) :: ConstraintSet) ((_rightExpressionIconstraints) :: ConstraintSet) ->
_conTotal .>.
Node [ _operatorIconstraints
, _leftExpressionIconstraints
, _rightExpressionIconstraints
]
rule1027 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1028 = \ ((_lhsIbetaUnique) :: Int) ->
TVar (_lhsIbetaUnique + 1)
rule1029 = \ _betaResOp _cinfoOperator ((_leftExpressionIbeta) :: Tp) ((_operatorIbeta) :: Tp) ((_rightExpressionIbeta) :: Tp) ->
(_operatorIbeta .==. _leftExpressionIbeta .->. _rightExpressionIbeta .->. _betaResOp) _cinfoOperator
rule1030 = \ _beta _betaResOp _cinfoComplete _cinfoEmpty _cinfoLeftSection _cinfoRightSection _conOperator ((_leftExpressionIbeta) :: Tp) ((_leftExpressionIsection) :: Bool) ((_operatorIbeta) :: Tp) ((_rightExpressionIbeta) :: Tp) ((_rightExpressionIsection) :: Bool) ->
case (_leftExpressionIsection,_rightExpressionIsection) of
(False,False) -> [ _conOperator, (_betaResOp .==. _beta) _cinfoComplete ]
(True ,True ) -> [ (_operatorIbeta .==. _beta) _cinfoEmpty ]
(False,True ) -> [ _conOperator, (_rightExpressionIbeta .->. _betaResOp .==. _beta) _cinfoRightSection ]
(True ,False) -> [ _conOperator, (_leftExpressionIbeta .->. _betaResOp .==. _beta) _cinfoLeftSection ]
rule1031 = \ ((_leftExpressionIinfoTrees) :: InfoTrees) ->
length _leftExpressionIinfoTrees
rule1032 = \ ((_leftExpressionIinfoTrees) :: InfoTrees) ((_leftExpressionIsection) :: Bool) _operatorNr _parentTree ((_rightExpressionIinfoTrees) :: InfoTrees) ((_rightExpressionIsection) :: Bool) ->
childConstraint _operatorNr "infix application" _parentTree $
if _leftExpressionIsection || _rightExpressionIsection
then [ HasTrustFactor 10.0 ]
else [ ApplicationEdge True (map attribute (_leftExpressionIinfoTrees ++ _rightExpressionIinfoTrees)) ]
rule1033 = \ _localInfo _parentTree ->
specialConstraint "infix application (INTERNAL ERROR)" _parentTree
(self _localInfo, Nothing)
[ FolkloreConstraint, highlyTrusted ]
rule1034 = \ _localInfo _parentTree ->
specialConstraint "left section" _parentTree
(self _localInfo, Nothing)
[ ]
rule1035 = \ _localInfo _parentTree ->
specialConstraint "right section" _parentTree
(self _localInfo, Nothing)
[ ]
rule1036 = \ _localInfo _parentTree ->
specialConstraint "infix application" _parentTree
(self _localInfo, Nothing)
[ FolkloreConstraint, HasTrustFactor 10.0 ]
rule1037 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1038 = \ ((_leftExpressionIinfoTrees) :: InfoTrees) ((_lhsIparentTree) :: InfoTree) _localInfo ((_operatorIinfoTree) :: InfoTree) ((_rightExpressionIinfoTrees) :: InfoTrees) ->
node _lhsIparentTree _localInfo
(_leftExpressionIinfoTrees ++ [_operatorIinfoTree] ++ _rightExpressionIinfoTrees)
rule1039 = \ _parentTree ->
_parentTree
rule1040 = \ _assumptions _constraints ((_leftExpressionImatches) :: [Maybe MetaVariableTable]) ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ((_operatorImatches) :: [Maybe MetaVariableTable]) ((_rightExpressionImatches) :: [Maybe MetaVariableTable]) ((_rightExpressionIuniqueSecondRound) :: Int) ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in match3 infoTuple _rightExpressionIuniqueSecondRound
match_Expression_InfixApplication
_lhsItryPatterns _lhsIallPatterns
[_leftExpressionImatches, _operatorImatches,_rightExpressionImatches]
rule1041 = \ _ioMatch ((_rightExpressionImatchIO) :: IO ()) ->
_rightExpressionImatchIO >> _ioMatch
rule1042 = \ ((_leftExpressionIcollectInstances) :: [(Name, Instance)]) ((_operatorIcollectInstances) :: [(Name, Instance)]) ((_rightExpressionIcollectInstances) :: [(Name, Instance)]) ->
_leftExpressionIcollectInstances ++ _operatorIcollectInstances ++ _rightExpressionIcollectInstances
rule1043 = \ ((_leftExpressionIunboundNames) :: Names) ((_operatorIunboundNames) :: Names) ((_rightExpressionIunboundNames) :: Names) ->
_leftExpressionIunboundNames ++ _operatorIunboundNames ++ _rightExpressionIunboundNames
rule1044 = \ ((_leftExpressionIself) :: MaybeExpression) ((_operatorIself) :: Expression) ((_rangeIself) :: Range) ((_rightExpressionIself) :: MaybeExpression) ->
Expression_InfixApplication _rangeIself _leftExpressionIself _operatorIself _rightExpressionIself
rule1045 = \ _self ->
_self
rule1046 = \ _beta ->
_beta
rule1047 = \ ((_rightExpressionIbetaUnique) :: Int) ->
_rightExpressionIbetaUnique
rule1048 = \ ((_rightExpressionIcollectErrors) :: TypeErrors) ->
_rightExpressionIcollectErrors
rule1049 = \ ((_rightExpressionIcollectWarnings) :: Warnings) ->
_rightExpressionIcollectWarnings
rule1050 = \ ((_rightExpressionIcounter) :: Int) ->
_rightExpressionIcounter
rule1051 = \ ((_rightExpressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_rightExpressionIdictionaryEnvironment
rule1052 = \ ((_rightExpressionIpatternMatchWarnings) :: [Warning]) ->
_rightExpressionIpatternMatchWarnings
rule1053 = \ ((_rightExpressionIuniqueChunk) :: Int) ->
_rightExpressionIuniqueChunk
rule1054 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1055 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1056 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1057 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1058 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1059 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1060 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1061 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1062 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1063 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1064 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1065 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1066 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1067 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1068 = \ _parentTree ->
_parentTree
rule1069 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1070 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1071 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1072 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1073 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule1074 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1075 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1076 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1077 = \ ((_leftExpressionIbetaUnique) :: Int) ->
_leftExpressionIbetaUnique
rule1078 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1079 = \ ((_leftExpressionIcollectErrors) :: TypeErrors) ->
_leftExpressionIcollectErrors
rule1080 = \ ((_leftExpressionIcollectWarnings) :: Warnings) ->
_leftExpressionIcollectWarnings
rule1081 = \ ((_leftExpressionIcounter) :: Int) ->
_leftExpressionIcounter
rule1082 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1083 = \ ((_leftExpressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_leftExpressionIdictionaryEnvironment
rule1084 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1085 = \ ((_leftExpressionImatchIO) :: IO ()) ->
_leftExpressionImatchIO
rule1086 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1087 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1088 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1089 = \ _parentTree ->
_parentTree
rule1090 = \ ((_leftExpressionIpatternMatchWarnings) :: [Warning]) ->
_leftExpressionIpatternMatchWarnings
rule1091 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1092 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1093 = \ ((_leftExpressionIuniqueChunk) :: Int) ->
_leftExpressionIuniqueChunk
rule1094 = \ ((_leftExpressionIuniqueSecondRound) :: Int) ->
_leftExpressionIuniqueSecondRound
rule1095 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1096 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1097 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1098 = \ ((_operatorIbetaUnique) :: Int) ->
_operatorIbetaUnique
rule1099 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1100 = \ ((_operatorIcollectErrors) :: TypeErrors) ->
_operatorIcollectErrors
rule1101 = \ ((_operatorIcollectWarnings) :: Warnings) ->
_operatorIcollectWarnings
rule1102 = \ ((_operatorIcounter) :: Int) ->
_operatorIcounter
rule1103 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1104 = \ ((_operatorIdictionaryEnvironment) :: DictionaryEnvironment) ->
_operatorIdictionaryEnvironment
rule1105 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1106 = \ ((_operatorImatchIO) :: IO ()) ->
_operatorImatchIO
rule1107 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1108 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1109 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1110 = \ _parentTree ->
_parentTree
rule1111 = \ ((_operatorIpatternMatchWarnings) :: [Warning]) ->
_operatorIpatternMatchWarnings
rule1112 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1113 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1114 = \ ((_operatorIuniqueChunk) :: Int) ->
_operatorIuniqueChunk
rule1115 = \ ((_operatorIuniqueSecondRound) :: Int) ->
_operatorIuniqueSecondRound
sem_Expression_If :: T_Range -> T_Expression -> T_Expression -> T_Expression -> T_Expression
sem_Expression_If arg_range_ arg_guardExpression_ arg_thenExpression_ arg_elseExpression_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_guardExpressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_guardExpression_))
_thenExpressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_thenExpression_))
_elseExpressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_elseExpression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _guardExpressionIassumptions _guardExpressionIbeta _guardExpressionIbetaUnique _guardExpressionIcollectErrors _guardExpressionIcollectInstances _guardExpressionIcollectWarnings _guardExpressionIconstraints _guardExpressionIcounter _guardExpressionIdictionaryEnvironment _guardExpressionIinfoTree _guardExpressionImatchIO _guardExpressionImatches _guardExpressionIpatternMatchWarnings _guardExpressionIself _guardExpressionIunboundNames _guardExpressionIuniqueChunk _guardExpressionIuniqueSecondRound) = inv_Expression_s41 _guardExpressionX41 (T_Expression_vIn40 _guardExpressionOallPatterns _guardExpressionOallTypeSchemes _guardExpressionOavailablePredicates _guardExpressionObetaUnique _guardExpressionOclassEnvironment _guardExpressionOcollectErrors _guardExpressionOcollectWarnings _guardExpressionOcounter _guardExpressionOcurrentChunk _guardExpressionOdictionaryEnvironment _guardExpressionOimportEnvironment _guardExpressionOmatchIO _guardExpressionOmonos _guardExpressionOnamesInScope _guardExpressionOorderedTypeSynonyms _guardExpressionOparentTree _guardExpressionOpatternMatchWarnings _guardExpressionOsubstitution _guardExpressionOtryPatterns _guardExpressionOtypeschemeMap _guardExpressionOuniqueChunk _guardExpressionOuniqueSecondRound)
(T_Expression_vOut40 _thenExpressionIassumptions _thenExpressionIbeta _thenExpressionIbetaUnique _thenExpressionIcollectErrors _thenExpressionIcollectInstances _thenExpressionIcollectWarnings _thenExpressionIconstraints _thenExpressionIcounter _thenExpressionIdictionaryEnvironment _thenExpressionIinfoTree _thenExpressionImatchIO _thenExpressionImatches _thenExpressionIpatternMatchWarnings _thenExpressionIself _thenExpressionIunboundNames _thenExpressionIuniqueChunk _thenExpressionIuniqueSecondRound) = inv_Expression_s41 _thenExpressionX41 (T_Expression_vIn40 _thenExpressionOallPatterns _thenExpressionOallTypeSchemes _thenExpressionOavailablePredicates _thenExpressionObetaUnique _thenExpressionOclassEnvironment _thenExpressionOcollectErrors _thenExpressionOcollectWarnings _thenExpressionOcounter _thenExpressionOcurrentChunk _thenExpressionOdictionaryEnvironment _thenExpressionOimportEnvironment _thenExpressionOmatchIO _thenExpressionOmonos _thenExpressionOnamesInScope _thenExpressionOorderedTypeSynonyms _thenExpressionOparentTree _thenExpressionOpatternMatchWarnings _thenExpressionOsubstitution _thenExpressionOtryPatterns _thenExpressionOtypeschemeMap _thenExpressionOuniqueChunk _thenExpressionOuniqueSecondRound)
(T_Expression_vOut40 _elseExpressionIassumptions _elseExpressionIbeta _elseExpressionIbetaUnique _elseExpressionIcollectErrors _elseExpressionIcollectInstances _elseExpressionIcollectWarnings _elseExpressionIconstraints _elseExpressionIcounter _elseExpressionIdictionaryEnvironment _elseExpressionIinfoTree _elseExpressionImatchIO _elseExpressionImatches _elseExpressionIpatternMatchWarnings _elseExpressionIself _elseExpressionIunboundNames _elseExpressionIuniqueChunk _elseExpressionIuniqueSecondRound) = inv_Expression_s41 _elseExpressionX41 (T_Expression_vIn40 _elseExpressionOallPatterns _elseExpressionOallTypeSchemes _elseExpressionOavailablePredicates _elseExpressionObetaUnique _elseExpressionOclassEnvironment _elseExpressionOcollectErrors _elseExpressionOcollectWarnings _elseExpressionOcounter _elseExpressionOcurrentChunk _elseExpressionOdictionaryEnvironment _elseExpressionOimportEnvironment _elseExpressionOmatchIO _elseExpressionOmonos _elseExpressionOnamesInScope _elseExpressionOorderedTypeSynonyms _elseExpressionOparentTree _elseExpressionOpatternMatchWarnings _elseExpressionOsubstitution _elseExpressionOtryPatterns _elseExpressionOtypeschemeMap _elseExpressionOuniqueChunk _elseExpressionOuniqueSecondRound)
_guardExpressionObetaUnique = rule1116 _lhsIbetaUnique
_assumptions = rule1117 _elseExpressionIassumptions _guardExpressionIassumptions _thenExpressionIassumptions
_constraints = rule1118 _conElse _conGuard _conThen _elseExpressionIconstraints _guardExpressionIconstraints _thenExpressionIconstraints
_beta = rule1119 _lhsIbetaUnique
_conGuard = rule1120 _cinfoGuard _guardExpressionIbeta
_conThen = rule1121 _beta _cinfoThen _thenExpressionIbeta
_conElse = rule1122 _beta _cinfoElse _elseExpressionIbeta
_cinfoGuard = rule1123 _parentTree
_cinfoThen = rule1124 _beta _localInfo _parentTree
_cinfoElse = rule1125 _beta _localInfo _parentTree
_localInfo = rule1126 _beta _lhsImonos _self
_parentTree = rule1127 _elseExpressionIinfoTree _guardExpressionIinfoTree _lhsIparentTree _localInfo _thenExpressionIinfoTree
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1128 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
((_guardExpressionOtryPatterns,_thenExpressionOtryPatterns,_elseExpressionOtryPatterns),_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule1129 _assumptions _constraints _elseExpressionImatches _elseExpressionIuniqueSecondRound _guardExpressionImatches _lhsIallPatterns _lhsItryPatterns _localInfo _thenExpressionImatches
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1130 _elseExpressionImatchIO _ioMatch
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1131 _elseExpressionIcollectInstances _guardExpressionIcollectInstances _thenExpressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1132 _elseExpressionIunboundNames _guardExpressionIunboundNames _thenExpressionIunboundNames
_self = rule1133 _elseExpressionIself _guardExpressionIself _rangeIself _thenExpressionIself
_lhsOself :: Expression
_lhsOself = rule1134 _self
_lhsObeta :: Tp
_lhsObeta = rule1135 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1136 _elseExpressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1137 _elseExpressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1138 _elseExpressionIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule1139 _elseExpressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1140 _elseExpressionIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1141 _elseExpressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1142 _elseExpressionIuniqueChunk
_guardExpressionOallPatterns = rule1143 _lhsIallPatterns
_guardExpressionOallTypeSchemes = rule1144 _lhsIallTypeSchemes
_guardExpressionOavailablePredicates = rule1145 _lhsIavailablePredicates
_guardExpressionOclassEnvironment = rule1146 _lhsIclassEnvironment
_guardExpressionOcollectErrors = rule1147 _lhsIcollectErrors
_guardExpressionOcollectWarnings = rule1148 _lhsIcollectWarnings
_guardExpressionOcounter = rule1149 _lhsIcounter
_guardExpressionOcurrentChunk = rule1150 _lhsIcurrentChunk
_guardExpressionOdictionaryEnvironment = rule1151 _lhsIdictionaryEnvironment
_guardExpressionOimportEnvironment = rule1152 _lhsIimportEnvironment
_guardExpressionOmatchIO = rule1153 _lhsImatchIO
_guardExpressionOmonos = rule1154 _lhsImonos
_guardExpressionOnamesInScope = rule1155 _lhsInamesInScope
_guardExpressionOorderedTypeSynonyms = rule1156 _lhsIorderedTypeSynonyms
_guardExpressionOparentTree = rule1157 _parentTree
_guardExpressionOpatternMatchWarnings = rule1158 _lhsIpatternMatchWarnings
_guardExpressionOsubstitution = rule1159 _lhsIsubstitution
_guardExpressionOtypeschemeMap = rule1160 _lhsItypeschemeMap
_guardExpressionOuniqueChunk = rule1161 _lhsIuniqueChunk
_guardExpressionOuniqueSecondRound = rule1162 _lhsIuniqueSecondRound
_thenExpressionOallPatterns = rule1163 _lhsIallPatterns
_thenExpressionOallTypeSchemes = rule1164 _lhsIallTypeSchemes
_thenExpressionOavailablePredicates = rule1165 _lhsIavailablePredicates
_thenExpressionObetaUnique = rule1166 _guardExpressionIbetaUnique
_thenExpressionOclassEnvironment = rule1167 _lhsIclassEnvironment
_thenExpressionOcollectErrors = rule1168 _guardExpressionIcollectErrors
_thenExpressionOcollectWarnings = rule1169 _guardExpressionIcollectWarnings
_thenExpressionOcounter = rule1170 _guardExpressionIcounter
_thenExpressionOcurrentChunk = rule1171 _lhsIcurrentChunk
_thenExpressionOdictionaryEnvironment = rule1172 _guardExpressionIdictionaryEnvironment
_thenExpressionOimportEnvironment = rule1173 _lhsIimportEnvironment
_thenExpressionOmatchIO = rule1174 _guardExpressionImatchIO
_thenExpressionOmonos = rule1175 _lhsImonos
_thenExpressionOnamesInScope = rule1176 _lhsInamesInScope
_thenExpressionOorderedTypeSynonyms = rule1177 _lhsIorderedTypeSynonyms
_thenExpressionOparentTree = rule1178 _parentTree
_thenExpressionOpatternMatchWarnings = rule1179 _guardExpressionIpatternMatchWarnings
_thenExpressionOsubstitution = rule1180 _lhsIsubstitution
_thenExpressionOtypeschemeMap = rule1181 _lhsItypeschemeMap
_thenExpressionOuniqueChunk = rule1182 _guardExpressionIuniqueChunk
_thenExpressionOuniqueSecondRound = rule1183 _guardExpressionIuniqueSecondRound
_elseExpressionOallPatterns = rule1184 _lhsIallPatterns
_elseExpressionOallTypeSchemes = rule1185 _lhsIallTypeSchemes
_elseExpressionOavailablePredicates = rule1186 _lhsIavailablePredicates
_elseExpressionObetaUnique = rule1187 _thenExpressionIbetaUnique
_elseExpressionOclassEnvironment = rule1188 _lhsIclassEnvironment
_elseExpressionOcollectErrors = rule1189 _thenExpressionIcollectErrors
_elseExpressionOcollectWarnings = rule1190 _thenExpressionIcollectWarnings
_elseExpressionOcounter = rule1191 _thenExpressionIcounter
_elseExpressionOcurrentChunk = rule1192 _lhsIcurrentChunk
_elseExpressionOdictionaryEnvironment = rule1193 _thenExpressionIdictionaryEnvironment
_elseExpressionOimportEnvironment = rule1194 _lhsIimportEnvironment
_elseExpressionOmatchIO = rule1195 _thenExpressionImatchIO
_elseExpressionOmonos = rule1196 _lhsImonos
_elseExpressionOnamesInScope = rule1197 _lhsInamesInScope
_elseExpressionOorderedTypeSynonyms = rule1198 _lhsIorderedTypeSynonyms
_elseExpressionOparentTree = rule1199 _parentTree
_elseExpressionOpatternMatchWarnings = rule1200 _thenExpressionIpatternMatchWarnings
_elseExpressionOsubstitution = rule1201 _lhsIsubstitution
_elseExpressionOtypeschemeMap = rule1202 _lhsItypeschemeMap
_elseExpressionOuniqueChunk = rule1203 _thenExpressionIuniqueChunk
_elseExpressionOuniqueSecondRound = rule1204 _thenExpressionIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1116 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule1117 = \ ((_elseExpressionIassumptions) :: Assumptions) ((_guardExpressionIassumptions) :: Assumptions) ((_thenExpressionIassumptions) :: Assumptions) ->
_guardExpressionIassumptions `combine` _thenExpressionIassumptions `combine` _elseExpressionIassumptions
rule1118 = \ _conElse _conGuard _conThen ((_elseExpressionIconstraints) :: ConstraintSet) ((_guardExpressionIconstraints) :: ConstraintSet) ((_thenExpressionIconstraints) :: ConstraintSet) ->
Node [ _conGuard .<. _guardExpressionIconstraints
, _conThen .<. _thenExpressionIconstraints
, _conElse .<. _elseExpressionIconstraints
]
rule1119 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1120 = \ _cinfoGuard ((_guardExpressionIbeta) :: Tp) ->
[ (_guardExpressionIbeta .==. boolType) _cinfoGuard ]
rule1121 = \ _beta _cinfoThen ((_thenExpressionIbeta) :: Tp) ->
[ (_thenExpressionIbeta .==. _beta ) _cinfoThen ]
rule1122 = \ _beta _cinfoElse ((_elseExpressionIbeta) :: Tp) ->
[ (_elseExpressionIbeta .==. _beta ) _cinfoElse ]
rule1123 = \ _parentTree ->
childConstraint 0 "conditional" _parentTree
[]
rule1124 = \ _beta _localInfo _parentTree ->
childConstraint 1 "then branch of conditional" _parentTree
[ Unifier (head (ftv _beta)) ("conditional", _localInfo, "then branch") ]
rule1125 = \ _beta _localInfo _parentTree ->
childConstraint 2 "else branch of conditional" _parentTree
[ Unifier (head (ftv _beta)) ("conditional", _localInfo, "else branch") ]
rule1126 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1127 = \ ((_elseExpressionIinfoTree) :: InfoTree) ((_guardExpressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ((_thenExpressionIinfoTree) :: InfoTree) ->
node _lhsIparentTree _localInfo [_guardExpressionIinfoTree, _thenExpressionIinfoTree, _elseExpressionIinfoTree]
rule1128 = \ _parentTree ->
_parentTree
rule1129 = \ _assumptions _constraints ((_elseExpressionImatches) :: [Maybe MetaVariableTable]) ((_elseExpressionIuniqueSecondRound) :: Int) ((_guardExpressionImatches) :: [Maybe MetaVariableTable]) ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ((_thenExpressionImatches) :: [Maybe MetaVariableTable]) ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in match3 infoTuple _elseExpressionIuniqueSecondRound
match_Expression_If
_lhsItryPatterns _lhsIallPatterns
[_guardExpressionImatches,_thenExpressionImatches,_elseExpressionImatches]
rule1130 = \ ((_elseExpressionImatchIO) :: IO ()) _ioMatch ->
_elseExpressionImatchIO >> _ioMatch
rule1131 = \ ((_elseExpressionIcollectInstances) :: [(Name, Instance)]) ((_guardExpressionIcollectInstances) :: [(Name, Instance)]) ((_thenExpressionIcollectInstances) :: [(Name, Instance)]) ->
_guardExpressionIcollectInstances ++ _thenExpressionIcollectInstances ++ _elseExpressionIcollectInstances
rule1132 = \ ((_elseExpressionIunboundNames) :: Names) ((_guardExpressionIunboundNames) :: Names) ((_thenExpressionIunboundNames) :: Names) ->
_guardExpressionIunboundNames ++ _thenExpressionIunboundNames ++ _elseExpressionIunboundNames
rule1133 = \ ((_elseExpressionIself) :: Expression) ((_guardExpressionIself) :: Expression) ((_rangeIself) :: Range) ((_thenExpressionIself) :: Expression) ->
Expression_If _rangeIself _guardExpressionIself _thenExpressionIself _elseExpressionIself
rule1134 = \ _self ->
_self
rule1135 = \ _beta ->
_beta
rule1136 = \ ((_elseExpressionIbetaUnique) :: Int) ->
_elseExpressionIbetaUnique
rule1137 = \ ((_elseExpressionIcollectErrors) :: TypeErrors) ->
_elseExpressionIcollectErrors
rule1138 = \ ((_elseExpressionIcollectWarnings) :: Warnings) ->
_elseExpressionIcollectWarnings
rule1139 = \ ((_elseExpressionIcounter) :: Int) ->
_elseExpressionIcounter
rule1140 = \ ((_elseExpressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_elseExpressionIdictionaryEnvironment
rule1141 = \ ((_elseExpressionIpatternMatchWarnings) :: [Warning]) ->
_elseExpressionIpatternMatchWarnings
rule1142 = \ ((_elseExpressionIuniqueChunk) :: Int) ->
_elseExpressionIuniqueChunk
rule1143 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1144 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1145 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1146 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1147 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1148 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1149 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1150 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1151 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1152 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1153 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1154 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1155 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1156 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1157 = \ _parentTree ->
_parentTree
rule1158 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1159 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1160 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1161 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1162 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule1163 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1164 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1165 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1166 = \ ((_guardExpressionIbetaUnique) :: Int) ->
_guardExpressionIbetaUnique
rule1167 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1168 = \ ((_guardExpressionIcollectErrors) :: TypeErrors) ->
_guardExpressionIcollectErrors
rule1169 = \ ((_guardExpressionIcollectWarnings) :: Warnings) ->
_guardExpressionIcollectWarnings
rule1170 = \ ((_guardExpressionIcounter) :: Int) ->
_guardExpressionIcounter
rule1171 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1172 = \ ((_guardExpressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_guardExpressionIdictionaryEnvironment
rule1173 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1174 = \ ((_guardExpressionImatchIO) :: IO ()) ->
_guardExpressionImatchIO
rule1175 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1176 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1177 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1178 = \ _parentTree ->
_parentTree
rule1179 = \ ((_guardExpressionIpatternMatchWarnings) :: [Warning]) ->
_guardExpressionIpatternMatchWarnings
rule1180 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1181 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1182 = \ ((_guardExpressionIuniqueChunk) :: Int) ->
_guardExpressionIuniqueChunk
rule1183 = \ ((_guardExpressionIuniqueSecondRound) :: Int) ->
_guardExpressionIuniqueSecondRound
rule1184 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1185 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1186 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1187 = \ ((_thenExpressionIbetaUnique) :: Int) ->
_thenExpressionIbetaUnique
rule1188 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1189 = \ ((_thenExpressionIcollectErrors) :: TypeErrors) ->
_thenExpressionIcollectErrors
rule1190 = \ ((_thenExpressionIcollectWarnings) :: Warnings) ->
_thenExpressionIcollectWarnings
rule1191 = \ ((_thenExpressionIcounter) :: Int) ->
_thenExpressionIcounter
rule1192 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1193 = \ ((_thenExpressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_thenExpressionIdictionaryEnvironment
rule1194 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1195 = \ ((_thenExpressionImatchIO) :: IO ()) ->
_thenExpressionImatchIO
rule1196 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1197 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1198 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1199 = \ _parentTree ->
_parentTree
rule1200 = \ ((_thenExpressionIpatternMatchWarnings) :: [Warning]) ->
_thenExpressionIpatternMatchWarnings
rule1201 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1202 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1203 = \ ((_thenExpressionIuniqueChunk) :: Int) ->
_thenExpressionIuniqueChunk
rule1204 = \ ((_thenExpressionIuniqueSecondRound) :: Int) ->
_thenExpressionIuniqueSecondRound
sem_Expression_Lambda :: T_Range -> T_Patterns -> T_Expression -> T_Expression
sem_Expression_Lambda arg_range_ arg_patterns_ arg_expression_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_patternsX122 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_patterns_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Patterns_vOut121 _patternsIbetaUnique _patternsIbetas _patternsIconstraintslist _patternsIcounter _patternsIelementss _patternsIenvironment _patternsIinfoTrees _patternsInumberOfPatterns _patternsIpatVarNames _patternsIpatternMatchWarnings _patternsIself _patternsIunboundNames) = inv_Patterns_s122 _patternsX122 (T_Patterns_vIn121 _patternsObetaUnique _patternsOcounter _patternsOimportEnvironment _patternsOmonos _patternsOnamesInScope _patternsOparentTree _patternsOpatternMatchWarnings)
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_patternsObetaUnique = rule1205 _lhsIbetaUnique
_expressionOmonos = rule1206 _csetBinds _lhsImonos _patternsIenvironment
_constraints = rule1207 _csetBinds _expressionIconstraints _newcon _patternsIconstraintslist
_beta = rule1208 _lhsIbetaUnique
_newcon = rule1209 _beta _cinfoType _expressionIbeta _patternsIbetas
(_csetBinds,_assumptions) = rule1210 _cinfoBind _expressionIassumptions _patternsIenvironment
_cinfoBind = rule1211 _parentTree _patternsIenvironment
_cinfoType = rule1212 _parentTree
_localInfo = rule1213 _beta _lhsImonos _self
_parentTree = rule1214 _expressionIinfoTree _lhsIparentTree _localInfo _patternsIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1215 _parentTree
(_namesInScope,_unboundNames,_scopeInfo) = rule1216 _expressionIunboundNames _lhsInamesInScope _patternsIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1217 _unboundNames
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule1218 _assumptions _constraints _lhsItryPatterns _localInfo
_expressionOtryPatterns = rule1219 ()
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1220 _beta _expressionIpatternMatchWarnings _lhsIimportEnvironment _lhsIsubstitution _patternsIelementss _patternsIself _rangeIself
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1221 _expressionIcollectInstances
_self = rule1222 _expressionIself _patternsIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule1223 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule1224 _assumptions
_lhsObeta :: Tp
_lhsObeta = rule1225 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1226 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1227 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1228 _expressionIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule1229 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule1230 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1231 _expressionIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1232 _expressionImatchIO
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1233 _expressionIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule1234 _expressionIuniqueSecondRound
_patternsOcounter = rule1235 _lhsIcounter
_patternsOimportEnvironment = rule1236 _lhsIimportEnvironment
_patternsOmonos = rule1237 _lhsImonos
_patternsOnamesInScope = rule1238 _namesInScope
_patternsOparentTree = rule1239 _parentTree
_patternsOpatternMatchWarnings = rule1240 _lhsIpatternMatchWarnings
_expressionOallPatterns = rule1241 _lhsIallPatterns
_expressionOallTypeSchemes = rule1242 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule1243 _lhsIavailablePredicates
_expressionObetaUnique = rule1244 _patternsIbetaUnique
_expressionOclassEnvironment = rule1245 _lhsIclassEnvironment
_expressionOcollectErrors = rule1246 _lhsIcollectErrors
_expressionOcollectWarnings = rule1247 _lhsIcollectWarnings
_expressionOcounter = rule1248 _patternsIcounter
_expressionOcurrentChunk = rule1249 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule1250 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule1251 _lhsIimportEnvironment
_expressionOmatchIO = rule1252 _lhsImatchIO
_expressionOnamesInScope = rule1253 _namesInScope
_expressionOorderedTypeSynonyms = rule1254 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule1255 _parentTree
_expressionOpatternMatchWarnings = rule1256 _patternsIpatternMatchWarnings
_expressionOsubstitution = rule1257 _lhsIsubstitution
_expressionOtypeschemeMap = rule1258 _lhsItypeschemeMap
_expressionOuniqueChunk = rule1259 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule1260 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1205 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule1206 = \ _csetBinds ((_lhsImonos) :: Monos) ((_patternsIenvironment) :: PatternAssumptions) ->
M.elems _patternsIenvironment ++ getMonos _csetBinds ++ _lhsImonos
rule1207 = \ _csetBinds ((_expressionIconstraints) :: ConstraintSet) _newcon ((_patternsIconstraintslist) :: ConstraintSets) ->
_newcon .>. _csetBinds .>>.
Node [ Node _patternsIconstraintslist
, _expressionIconstraints
]
rule1208 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1209 = \ _beta _cinfoType ((_expressionIbeta) :: Tp) ((_patternsIbetas) :: Tps) ->
[ (foldr (.->.) _expressionIbeta _patternsIbetas .==. _beta) _cinfoType ]
rule1210 = \ _cinfoBind ((_expressionIassumptions) :: Assumptions) ((_patternsIenvironment) :: PatternAssumptions) ->
(_patternsIenvironment .===. _expressionIassumptions) _cinfoBind
rule1211 = \ _parentTree ((_patternsIenvironment) :: PatternAssumptions) ->
\name -> variableConstraint "variable" (nameToUHA_Expr name)
[ FolkloreConstraint
, makeUnifier name "lambda abstraction" _patternsIenvironment _parentTree
]
rule1212 = \ _parentTree ->
resultConstraint "lambda abstraction" _parentTree
[ FolkloreConstraint ]
rule1213 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1214 = \ ((_expressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ((_patternsIinfoTrees) :: InfoTrees) ->
node _lhsIparentTree _localInfo (_patternsIinfoTrees ++ [_expressionIinfoTree])
rule1215 = \ _parentTree ->
_parentTree
rule1216 = \ ((_expressionIunboundNames) :: Names) ((_lhsInamesInScope) :: Names) ((_patternsIpatVarNames) :: Names) ->
changeOfScope _patternsIpatVarNames _expressionIunboundNames _lhsInamesInScope
rule1217 = \ _unboundNames ->
_unboundNames
rule1218 = \ _assumptions _constraints ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in matchOnlyVariable infoTuple _lhsItryPatterns
rule1219 = \ (_ :: ()) ->
[]
rule1220 = \ _beta ((_expressionIpatternMatchWarnings) :: [Warning]) ((_lhsIimportEnvironment) :: ImportEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) ((_patternsIelementss) :: [ [PatternElement] ]) ((_patternsIself) :: Patterns) ((_rangeIself) :: Range) ->
patternMatchWarnings _lhsIimportEnvironment
_lhsIsubstitution
_beta
(take (length _patternsIself) . fst . functionSpine)
[(concat _patternsIelementss, False)]
_rangeIself
(Just $ Name_Special noRange [] "\\")
True
[]
"lambda expression"
"->"
++ _expressionIpatternMatchWarnings
rule1221 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule1222 = \ ((_expressionIself) :: Expression) ((_patternsIself) :: Patterns) ((_rangeIself) :: Range) ->
Expression_Lambda _rangeIself _patternsIself _expressionIself
rule1223 = \ _self ->
_self
rule1224 = \ _assumptions ->
_assumptions
rule1225 = \ _beta ->
_beta
rule1226 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule1227 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule1228 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule1229 = \ _constraints ->
_constraints
rule1230 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule1231 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule1232 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule1233 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule1234 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule1235 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1236 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1237 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1238 = \ _namesInScope ->
_namesInScope
rule1239 = \ _parentTree ->
_parentTree
rule1240 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1241 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1242 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1243 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1244 = \ ((_patternsIbetaUnique) :: Int) ->
_patternsIbetaUnique
rule1245 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1246 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1247 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1248 = \ ((_patternsIcounter) :: Int) ->
_patternsIcounter
rule1249 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1250 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1251 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1252 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1253 = \ _namesInScope ->
_namesInScope
rule1254 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1255 = \ _parentTree ->
_parentTree
rule1256 = \ ((_patternsIpatternMatchWarnings) :: [Warning]) ->
_patternsIpatternMatchWarnings
rule1257 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1258 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1259 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1260 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Expression_Case :: T_Range -> T_Expression -> T_Alternatives -> T_Expression
sem_Expression_Case arg_range_ arg_expression_ arg_alternatives_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
_alternativesX5 = Control.Monad.Identity.runIdentity (attach_T_Alternatives (arg_alternatives_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
(T_Alternatives_vOut4 _alternativesIassumptions _alternativesIbetaUnique _alternativesIcollectErrors _alternativesIcollectInstances _alternativesIcollectWarnings _alternativesIconstraintslist _alternativesIcounter _alternativesIdictionaryEnvironment _alternativesIelementss _alternativesIinfoTrees _alternativesImatchIO _alternativesIpatternMatchWarnings _alternativesIself _alternativesIunboundNames _alternativesIuniqueChunk _alternativesIunrwars) = inv_Alternatives_s5 _alternativesX5 (T_Alternatives_vIn4 _alternativesOallPatterns _alternativesOallTypeSchemes _alternativesOavailablePredicates _alternativesObetaLeft _alternativesObetaRight _alternativesObetaUnique _alternativesOclassEnvironment _alternativesOcollectErrors _alternativesOcollectWarnings _alternativesOcounter _alternativesOcurrentChunk _alternativesOdictionaryEnvironment _alternativesOimportEnvironment _alternativesOmatchIO _alternativesOmonos _alternativesOnamesInScope _alternativesOorderedTypeSynonyms _alternativesOparentTree _alternativesOpatternMatchWarnings _alternativesOsubstitution _alternativesOtypeschemeMap _alternativesOuniqueChunk)
_expressionObetaUnique = rule1261 _lhsIbetaUnique
_alternativesObetaLeft = rule1262 _beta'
_alternativesObetaRight = rule1263 _beta
_assumptions = rule1264 _alternativesIassumptions _expressionIassumptions
_constraints = rule1265 _alternativesIconstraintslist _expressionIconstraints _newcon
_beta = rule1266 _lhsIbetaUnique
_beta' = rule1267 _lhsIbetaUnique
_newcon = rule1268 _beta' _cinfo _expressionIbeta
_cinfo = rule1269 _beta' _localInfo _parentTree
_localInfo = rule1270 _beta _lhsImonos _self
_parentTree = rule1271 _alternativesIinfoTrees _expressionIinfoTree _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1272 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule1273 _assumptions _constraints _lhsItryPatterns _localInfo
_expressionOtryPatterns = rule1274 ()
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1275 _alternativesIelementss _alternativesIpatternMatchWarnings _alternativesIunrwars _expressionIbeta _lhsIimportEnvironment _lhsIsubstitution _rangeIself
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1276 _alternativesIcollectInstances _expressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1277 _alternativesIunboundNames _expressionIunboundNames
_self = rule1278 _alternativesIself _expressionIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule1279 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule1280 _assumptions
_lhsObeta :: Tp
_lhsObeta = rule1281 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1282 _alternativesIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1283 _alternativesIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1284 _alternativesIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule1285 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule1286 _alternativesIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1287 _alternativesIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1288 _alternativesImatchIO
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1289 _alternativesIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule1290 _expressionIuniqueSecondRound
_expressionOallPatterns = rule1291 _lhsIallPatterns
_expressionOallTypeSchemes = rule1292 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule1293 _lhsIavailablePredicates
_expressionOclassEnvironment = rule1294 _lhsIclassEnvironment
_expressionOcollectErrors = rule1295 _lhsIcollectErrors
_expressionOcollectWarnings = rule1296 _lhsIcollectWarnings
_expressionOcounter = rule1297 _lhsIcounter
_expressionOcurrentChunk = rule1298 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule1299 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule1300 _lhsIimportEnvironment
_expressionOmatchIO = rule1301 _lhsImatchIO
_expressionOmonos = rule1302 _lhsImonos
_expressionOnamesInScope = rule1303 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule1304 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule1305 _parentTree
_expressionOpatternMatchWarnings = rule1306 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule1307 _lhsIsubstitution
_expressionOtypeschemeMap = rule1308 _lhsItypeschemeMap
_expressionOuniqueChunk = rule1309 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule1310 _lhsIuniqueSecondRound
_alternativesOallPatterns = rule1311 _lhsIallPatterns
_alternativesOallTypeSchemes = rule1312 _lhsIallTypeSchemes
_alternativesOavailablePredicates = rule1313 _lhsIavailablePredicates
_alternativesObetaUnique = rule1314 _expressionIbetaUnique
_alternativesOclassEnvironment = rule1315 _lhsIclassEnvironment
_alternativesOcollectErrors = rule1316 _expressionIcollectErrors
_alternativesOcollectWarnings = rule1317 _expressionIcollectWarnings
_alternativesOcounter = rule1318 _expressionIcounter
_alternativesOcurrentChunk = rule1319 _lhsIcurrentChunk
_alternativesOdictionaryEnvironment = rule1320 _expressionIdictionaryEnvironment
_alternativesOimportEnvironment = rule1321 _lhsIimportEnvironment
_alternativesOmatchIO = rule1322 _expressionImatchIO
_alternativesOmonos = rule1323 _lhsImonos
_alternativesOnamesInScope = rule1324 _lhsInamesInScope
_alternativesOorderedTypeSynonyms = rule1325 _lhsIorderedTypeSynonyms
_alternativesOparentTree = rule1326 _parentTree
_alternativesOpatternMatchWarnings = rule1327 _expressionIpatternMatchWarnings
_alternativesOsubstitution = rule1328 _lhsIsubstitution
_alternativesOtypeschemeMap = rule1329 _lhsItypeschemeMap
_alternativesOuniqueChunk = rule1330 _expressionIuniqueChunk
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1261 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 2
rule1262 = \ _beta' ->
_beta'
rule1263 = \ _beta ->
_beta
rule1264 = \ ((_alternativesIassumptions) :: Assumptions) ((_expressionIassumptions) :: Assumptions) ->
_expressionIassumptions `combine` _alternativesIassumptions
rule1265 = \ ((_alternativesIconstraintslist) :: ConstraintSets) ((_expressionIconstraints) :: ConstraintSet) _newcon ->
Node [ _newcon .<. _expressionIconstraints
, Node _alternativesIconstraintslist
]
rule1266 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1267 = \ ((_lhsIbetaUnique) :: Int) ->
TVar (_lhsIbetaUnique + 1)
rule1268 = \ _beta' _cinfo ((_expressionIbeta) :: Tp) ->
[ (_expressionIbeta .==. _beta') _cinfo ]
rule1269 = \ _beta' _localInfo _parentTree ->
childConstraint 0 "scrutinee of case expression" _parentTree
[ Unifier (head (ftv _beta')) ("case patterns", _localInfo, "scrutinee") ]
rule1270 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1271 = \ ((_alternativesIinfoTrees) :: InfoTrees) ((_expressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo (_expressionIinfoTree : _alternativesIinfoTrees)
rule1272 = \ _parentTree ->
_parentTree
rule1273 = \ _assumptions _constraints ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in matchOnlyVariable infoTuple _lhsItryPatterns
rule1274 = \ (_ :: ()) ->
[]
rule1275 = \ ((_alternativesIelementss) :: [([PatternElement], Bool)]) ((_alternativesIpatternMatchWarnings) :: [Warning]) ((_alternativesIunrwars) :: [Warning]) ((_expressionIbeta) :: Tp) ((_lhsIimportEnvironment) :: ImportEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) ((_rangeIself) :: Range) ->
patternMatchWarnings _lhsIimportEnvironment
_lhsIsubstitution
_expressionIbeta
(:[])
_alternativesIelementss
_rangeIself
Nothing
False
_alternativesIunrwars
"case expression"
"->"
++ _alternativesIpatternMatchWarnings
rule1276 = \ ((_alternativesIcollectInstances) :: [(Name, Instance)]) ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances ++ _alternativesIcollectInstances
rule1277 = \ ((_alternativesIunboundNames) :: Names) ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames ++ _alternativesIunboundNames
rule1278 = \ ((_alternativesIself) :: Alternatives) ((_expressionIself) :: Expression) ((_rangeIself) :: Range) ->
Expression_Case _rangeIself _expressionIself _alternativesIself
rule1279 = \ _self ->
_self
rule1280 = \ _assumptions ->
_assumptions
rule1281 = \ _beta ->
_beta
rule1282 = \ ((_alternativesIbetaUnique) :: Int) ->
_alternativesIbetaUnique
rule1283 = \ ((_alternativesIcollectErrors) :: TypeErrors) ->
_alternativesIcollectErrors
rule1284 = \ ((_alternativesIcollectWarnings) :: Warnings) ->
_alternativesIcollectWarnings
rule1285 = \ _constraints ->
_constraints
rule1286 = \ ((_alternativesIcounter) :: Int) ->
_alternativesIcounter
rule1287 = \ ((_alternativesIdictionaryEnvironment) :: DictionaryEnvironment) ->
_alternativesIdictionaryEnvironment
rule1288 = \ ((_alternativesImatchIO) :: IO ()) ->
_alternativesImatchIO
rule1289 = \ ((_alternativesIuniqueChunk) :: Int) ->
_alternativesIuniqueChunk
rule1290 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule1291 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1292 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1293 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1294 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1295 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1296 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1297 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1298 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1299 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1300 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1301 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1302 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1303 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1304 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1305 = \ _parentTree ->
_parentTree
rule1306 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1307 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1308 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1309 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1310 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule1311 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1312 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1313 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1314 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule1315 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1316 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule1317 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule1318 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule1319 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1320 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule1321 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1322 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule1323 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1324 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1325 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1326 = \ _parentTree ->
_parentTree
rule1327 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule1328 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1329 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1330 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
sem_Expression_Let :: T_Range -> T_Declarations -> T_Expression -> T_Expression
sem_Expression_Let arg_range_ arg_declarations_ arg_expression_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_declarationsX32 = Control.Monad.Identity.runIdentity (attach_T_Declarations (arg_declarations_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Declarations_vOut31 _declarationsIbetaUnique _declarationsIbindingGroups _declarationsIcollectErrors _declarationsIcollectInstances _declarationsIcollectWarnings _declarationsIcounter _declarationsIdeclVarNames _declarationsIdictionaryEnvironment _declarationsIinfoTrees _declarationsImatchIO _declarationsIpatternMatchWarnings _declarationsIrestrictedNames _declarationsIself _declarationsIsimplePatNames _declarationsItypeSignatures _declarationsIunboundNames _declarationsIuniqueChunk) = inv_Declarations_s32 _declarationsX32 (T_Declarations_vIn31 _declarationsOallPatterns _declarationsOallTypeSchemes _declarationsOavailablePredicates _declarationsObetaUnique _declarationsObindingGroups _declarationsOclassEnvironment _declarationsOcollectErrors _declarationsOcollectWarnings _declarationsOcounter _declarationsOcurrentChunk _declarationsOdictionaryEnvironment _declarationsOimportEnvironment _declarationsOinheritedBDG _declarationsOmatchIO _declarationsOmonos _declarationsOnamesInScope _declarationsOorderedTypeSynonyms _declarationsOparentTree _declarationsOpatternMatchWarnings _declarationsOsubstitution _declarationsOtypeSignatures _declarationsOtypeschemeMap _declarationsOuniqueChunk)
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_declarationsObetaUnique = rule1331 _lhsIbetaUnique
_declarationsObindingGroups = rule1332 ()
_constraints = rule1333 _beta _cinfoType _cset _expressionIbeta
_beta = rule1334 _lhsIbetaUnique
_lhsObetaUnique :: Int
(_assumptions,_cset,_inheritedBDG,_chunkNr,_lhsObetaUnique,_implicitsFM) = rule1335 _declarationsIbindingGroups _declarationsItypeSignatures _expressionIassumptions _expressionIbetaUnique _expressionIconstraints _expressionIuniqueChunk _lhsIcurrentChunk _lhsImonos
_inferredTypes = rule1336 _implicitsFM _lhsItypeschemeMap
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1337 _declarationsIsimplePatNames _expressionIcollectWarnings _inferredTypes
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1338 _declarationsIcollectErrors _declarationsIrestrictedNames _inferredTypes
_allTypeSchemes = rule1339 _lhsIallTypeSchemes _localTypes
_localTypes = rule1340 _declarationsIbindingGroups _declarationsItypeSignatures _inferredTypes
_declarationsOtypeSignatures = rule1341 ()
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1342 _chunkNr
_cinfoType = rule1343 _thisTree
_localInfo = rule1344 _beta _lhsImonos _self
_declInfo = rule1345 _declarationsIself _lhsImonos
_thisTree = rule1346 _declTree _expressionIinfoTree _lhsIparentTree _localInfo
_declTree = rule1347 _declInfo _declarationsIinfoTrees _thisTree
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1348 _thisTree
_expressionOparentTree = rule1349 _thisTree
_declarationsOparentTree = rule1350 _declTree
(_collectTypeConstructors,_collectValueConstructors,_collectTypeSynonyms,_collectConstructorEnv,_derivedFunctions,_operatorFixities) = rule1351 ()
(_namesInScope,_unboundNames,_scopeInfo) = rule1352 _declarationsIdeclVarNames _declarationsIunboundNames _expressionIunboundNames _lhsInamesInScope
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1353 _unboundNames
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule1354 _assumptions _constraints _lhsItryPatterns _localInfo
_expressionOtryPatterns = rule1355 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1356 _declarationsIcollectInstances _expressionIcollectInstances
_self = rule1357 _declarationsIself _expressionIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule1358 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule1359 _assumptions
_lhsObeta :: Tp
_lhsObeta = rule1360 _beta
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule1361 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule1362 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1363 _expressionIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1364 _expressionImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1365 _expressionIpatternMatchWarnings
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule1366 _expressionIuniqueSecondRound
_declarationsOallPatterns = rule1367 _lhsIallPatterns
_declarationsOallTypeSchemes = rule1368 _allTypeSchemes
_declarationsOavailablePredicates = rule1369 _lhsIavailablePredicates
_declarationsOclassEnvironment = rule1370 _lhsIclassEnvironment
_declarationsOcollectErrors = rule1371 _lhsIcollectErrors
_declarationsOcollectWarnings = rule1372 _lhsIcollectWarnings
_declarationsOcounter = rule1373 _lhsIcounter
_declarationsOcurrentChunk = rule1374 _lhsIcurrentChunk
_declarationsOdictionaryEnvironment = rule1375 _lhsIdictionaryEnvironment
_declarationsOimportEnvironment = rule1376 _lhsIimportEnvironment
_declarationsOinheritedBDG = rule1377 _inheritedBDG
_declarationsOmatchIO = rule1378 _lhsImatchIO
_declarationsOmonos = rule1379 _lhsImonos
_declarationsOnamesInScope = rule1380 _namesInScope
_declarationsOorderedTypeSynonyms = rule1381 _lhsIorderedTypeSynonyms
_declarationsOpatternMatchWarnings = rule1382 _lhsIpatternMatchWarnings
_declarationsOsubstitution = rule1383 _lhsIsubstitution
_declarationsOtypeschemeMap = rule1384 _lhsItypeschemeMap
_declarationsOuniqueChunk = rule1385 _lhsIuniqueChunk
_expressionOallPatterns = rule1386 _lhsIallPatterns
_expressionOallTypeSchemes = rule1387 _allTypeSchemes
_expressionOavailablePredicates = rule1388 _lhsIavailablePredicates
_expressionObetaUnique = rule1389 _declarationsIbetaUnique
_expressionOclassEnvironment = rule1390 _lhsIclassEnvironment
_expressionOcollectErrors = rule1391 _declarationsIcollectErrors
_expressionOcollectWarnings = rule1392 _declarationsIcollectWarnings
_expressionOcounter = rule1393 _declarationsIcounter
_expressionOcurrentChunk = rule1394 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule1395 _declarationsIdictionaryEnvironment
_expressionOimportEnvironment = rule1396 _lhsIimportEnvironment
_expressionOmatchIO = rule1397 _declarationsImatchIO
_expressionOmonos = rule1398 _lhsImonos
_expressionOnamesInScope = rule1399 _namesInScope
_expressionOorderedTypeSynonyms = rule1400 _lhsIorderedTypeSynonyms
_expressionOpatternMatchWarnings = rule1401 _declarationsIpatternMatchWarnings
_expressionOsubstitution = rule1402 _lhsIsubstitution
_expressionOtypeschemeMap = rule1403 _lhsItypeschemeMap
_expressionOuniqueChunk = rule1404 _declarationsIuniqueChunk
_expressionOuniqueSecondRound = rule1405 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1331 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule1332 = \ (_ :: ()) ->
[]
rule1333 = \ _beta _cinfoType _cset ((_expressionIbeta) :: Tp) ->
[ (_expressionIbeta .==. _beta) _cinfoType ] .>. _cset
rule1334 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1335 = \ ((_declarationsIbindingGroups) :: BindingGroups) ((_declarationsItypeSignatures) :: TypeEnvironment) ((_expressionIassumptions) :: Assumptions) ((_expressionIbetaUnique) :: Int) ((_expressionIconstraints) :: ConstraintSet) ((_expressionIuniqueChunk) :: Int) ((_lhsIcurrentChunk) :: Int) ((_lhsImonos) :: Monos) ->
let inputBDG = (False, _lhsIcurrentChunk, _expressionIuniqueChunk, _lhsImonos, _declarationsItypeSignatures, mybdggroup, _expressionIbetaUnique)
mybdggroup = Just (_expressionIassumptions, [_expressionIconstraints])
in performBindingGroup inputBDG _declarationsIbindingGroups
rule1336 = \ _implicitsFM ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
findInferredTypes _lhsItypeschemeMap _implicitsFM
rule1337 = \ ((_declarationsIsimplePatNames) :: Names) ((_expressionIcollectWarnings) :: Warnings) _inferredTypes ->
missingTypeSignature False _declarationsIsimplePatNames _inferredTypes
++ _expressionIcollectWarnings
rule1338 = \ ((_declarationsIcollectErrors) :: TypeErrors) ((_declarationsIrestrictedNames) :: Names) _inferredTypes ->
restrictedNameErrors _inferredTypes _declarationsIrestrictedNames
++ _declarationsIcollectErrors
rule1339 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) _localTypes ->
_localTypes `M.union` _lhsIallTypeSchemes
rule1340 = \ ((_declarationsIbindingGroups) :: BindingGroups) ((_declarationsItypeSignatures) :: TypeEnvironment) _inferredTypes ->
makeLocalTypeEnv (_declarationsItypeSignatures `M.union` _inferredTypes) _declarationsIbindingGroups
rule1341 = \ (_ :: ()) ->
M.empty
rule1342 = \ _chunkNr ->
_chunkNr
rule1343 = \ _thisTree ->
resultConstraint "let expression (INTERNAL ERROR)" _thisTree
[ FolkloreConstraint, highlyTrusted ]
rule1344 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1345 = \ ((_declarationsIself) :: Declarations) ((_lhsImonos) :: Monos) ->
LocalInfo { self = UHA_Decls _declarationsIself
, assignedType = Nothing
, monos = _lhsImonos
}
rule1346 = \ _declTree ((_expressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo [_declTree, _expressionIinfoTree]
rule1347 = \ _declInfo ((_declarationsIinfoTrees) :: InfoTrees) _thisTree ->
node _thisTree _declInfo _declarationsIinfoTrees
rule1348 = \ _thisTree ->
_thisTree
rule1349 = \ _thisTree ->
_thisTree
rule1350 = \ _declTree ->
_declTree
rule1351 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "toplevel Expression"
rule1352 = \ ((_declarationsIdeclVarNames) :: Names) ((_declarationsIunboundNames) :: Names) ((_expressionIunboundNames) :: Names) ((_lhsInamesInScope) :: Names) ->
changeOfScope _declarationsIdeclVarNames (_declarationsIunboundNames ++ _expressionIunboundNames) _lhsInamesInScope
rule1353 = \ _unboundNames ->
_unboundNames
rule1354 = \ _assumptions _constraints ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in matchOnlyVariable infoTuple _lhsItryPatterns
rule1355 = \ (_ :: ()) ->
[]
rule1356 = \ ((_declarationsIcollectInstances) :: [(Name, Instance)]) ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_declarationsIcollectInstances ++ _expressionIcollectInstances
rule1357 = \ ((_declarationsIself) :: Declarations) ((_expressionIself) :: Expression) ((_rangeIself) :: Range) ->
Expression_Let _rangeIself _declarationsIself _expressionIself
rule1358 = \ _self ->
_self
rule1359 = \ _assumptions ->
_assumptions
rule1360 = \ _beta ->
_beta
rule1361 = \ _constraints ->
_constraints
rule1362 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule1363 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule1364 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule1365 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule1366 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule1367 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1368 = \ _allTypeSchemes ->
_allTypeSchemes
rule1369 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1370 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1371 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1372 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1373 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1374 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1375 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1376 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1377 = \ _inheritedBDG ->
_inheritedBDG
rule1378 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1379 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1380 = \ _namesInScope ->
_namesInScope
rule1381 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1382 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1383 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1384 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1385 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1386 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1387 = \ _allTypeSchemes ->
_allTypeSchemes
rule1388 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1389 = \ ((_declarationsIbetaUnique) :: Int) ->
_declarationsIbetaUnique
rule1390 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1391 = \ ((_declarationsIcollectErrors) :: TypeErrors) ->
_declarationsIcollectErrors
rule1392 = \ ((_declarationsIcollectWarnings) :: Warnings) ->
_declarationsIcollectWarnings
rule1393 = \ ((_declarationsIcounter) :: Int) ->
_declarationsIcounter
rule1394 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1395 = \ ((_declarationsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_declarationsIdictionaryEnvironment
rule1396 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1397 = \ ((_declarationsImatchIO) :: IO ()) ->
_declarationsImatchIO
rule1398 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1399 = \ _namesInScope ->
_namesInScope
rule1400 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1401 = \ ((_declarationsIpatternMatchWarnings) :: [Warning]) ->
_declarationsIpatternMatchWarnings
rule1402 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1403 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1404 = \ ((_declarationsIuniqueChunk) :: Int) ->
_declarationsIuniqueChunk
rule1405 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Expression_Do :: T_Range -> T_Statements -> T_Expression
sem_Expression_Do arg_range_ arg_statements_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_statementsX158 = Control.Monad.Identity.runIdentity (attach_T_Statements (arg_statements_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Statements_vOut157 _statementsIassumptions _statementsIbetaUnique _statementsIcollectErrors _statementsIcollectInstances _statementsIcollectWarnings _statementsIconstraints _statementsIcounter _statementsIdictionaryEnvironment _statementsIgeneratorBeta _statementsIinfoTrees _statementsImatchIO _statementsInamesInScope _statementsIpatternMatchWarnings _statementsIself _statementsIunboundNames _statementsIuniqueChunk _statementsIuniqueSecondRound) = inv_Statements_s158 _statementsX158 (T_Statements_vIn157 _statementsOallPatterns _statementsOallTypeSchemes _statementsOassumptions _statementsOavailablePredicates _statementsObetaUnique _statementsOclassEnvironment _statementsOcollectErrors _statementsOcollectWarnings _statementsOconstraints _statementsOcounter _statementsOcurrentChunk _statementsOdictionaryEnvironment _statementsOgeneratorBeta _statementsOimportEnvironment _statementsOmatchIO _statementsOmonos _statementsOnamesInScope _statementsOorderedTypeSynonyms _statementsOparentTree _statementsOpatternMatchWarnings _statementsOsubstitution _statementsOtypeschemeMap _statementsOunboundNames _statementsOuniqueChunk _statementsOuniqueSecondRound)
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule1406 _newcon _statementsIconstraints
_statementsObetaUnique = rule1407 _lhsIbetaUnique
_statementsOgeneratorBeta = rule1408 ()
_statementsOassumptions = rule1409 ()
_assumptions = rule1410 _statementsIassumptions
_constraints = rule1411 ()
_beta = rule1412 _lhsIbetaUnique
_newcon = rule1413 _beta _cinfo _statementsIgeneratorBeta
_cinfo = rule1414 _parentTree
_localInfo = rule1415 _beta _lhsImonos _self
_parentTree = rule1416 _lhsIparentTree _localInfo _statementsIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1417 _parentTree
_statementsOunboundNames = rule1418 ()
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule1419 _assumptions _constraints _lhsItryPatterns _localInfo
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1420 _statementsIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1421 _statementsIunboundNames
_self = rule1422 _rangeIself _statementsIself
_lhsOself :: Expression
_lhsOself = rule1423 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule1424 _assumptions
_lhsObeta :: Tp
_lhsObeta = rule1425 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1426 _statementsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1427 _statementsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1428 _statementsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule1429 _statementsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1430 _statementsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1431 _statementsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1432 _statementsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1433 _statementsIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule1434 _statementsIuniqueSecondRound
_statementsOallPatterns = rule1435 _lhsIallPatterns
_statementsOallTypeSchemes = rule1436 _lhsIallTypeSchemes
_statementsOavailablePredicates = rule1437 _lhsIavailablePredicates
_statementsOclassEnvironment = rule1438 _lhsIclassEnvironment
_statementsOcollectErrors = rule1439 _lhsIcollectErrors
_statementsOcollectWarnings = rule1440 _lhsIcollectWarnings
_statementsOconstraints = rule1441 _constraints
_statementsOcounter = rule1442 _lhsIcounter
_statementsOcurrentChunk = rule1443 _lhsIcurrentChunk
_statementsOdictionaryEnvironment = rule1444 _lhsIdictionaryEnvironment
_statementsOimportEnvironment = rule1445 _lhsIimportEnvironment
_statementsOmatchIO = rule1446 _lhsImatchIO
_statementsOmonos = rule1447 _lhsImonos
_statementsOnamesInScope = rule1448 _lhsInamesInScope
_statementsOorderedTypeSynonyms = rule1449 _lhsIorderedTypeSynonyms
_statementsOparentTree = rule1450 _parentTree
_statementsOpatternMatchWarnings = rule1451 _lhsIpatternMatchWarnings
_statementsOsubstitution = rule1452 _lhsIsubstitution
_statementsOtypeschemeMap = rule1453 _lhsItypeschemeMap
_statementsOuniqueChunk = rule1454 _lhsIuniqueChunk
_statementsOuniqueSecondRound = rule1455 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1406 = \ _newcon ((_statementsIconstraints) :: ConstraintSet) ->
Node [ _newcon .<. _statementsIconstraints ]
rule1407 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule1408 = \ (_ :: ()) ->
Nothing
rule1409 = \ (_ :: ()) ->
noAssumptions
rule1410 = \ ((_statementsIassumptions) :: Assumptions) ->
_statementsIassumptions
rule1411 = \ (_ :: ()) ->
emptyTree
rule1412 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1413 = \ _beta _cinfo ((_statementsIgeneratorBeta) :: Maybe Tp) ->
case _statementsIgeneratorBeta of
Nothing -> []
Just b -> [ (ioType b .==. _beta) _cinfo ]
rule1414 = \ _parentTree ->
resultConstraint "do-expression" _parentTree
[ FolkloreConstraint ]
rule1415 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1416 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ((_statementsIinfoTrees) :: InfoTrees) ->
node _lhsIparentTree _localInfo _statementsIinfoTrees
rule1417 = \ _parentTree ->
_parentTree
rule1418 = \ (_ :: ()) ->
[]
rule1419 = \ _assumptions _constraints ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in matchOnlyVariable infoTuple _lhsItryPatterns
rule1420 = \ ((_statementsIcollectInstances) :: [(Name, Instance)]) ->
_statementsIcollectInstances
rule1421 = \ ((_statementsIunboundNames) :: Names) ->
_statementsIunboundNames
rule1422 = \ ((_rangeIself) :: Range) ((_statementsIself) :: Statements) ->
Expression_Do _rangeIself _statementsIself
rule1423 = \ _self ->
_self
rule1424 = \ _assumptions ->
_assumptions
rule1425 = \ _beta ->
_beta
rule1426 = \ ((_statementsIbetaUnique) :: Int) ->
_statementsIbetaUnique
rule1427 = \ ((_statementsIcollectErrors) :: TypeErrors) ->
_statementsIcollectErrors
rule1428 = \ ((_statementsIcollectWarnings) :: Warnings) ->
_statementsIcollectWarnings
rule1429 = \ ((_statementsIcounter) :: Int) ->
_statementsIcounter
rule1430 = \ ((_statementsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_statementsIdictionaryEnvironment
rule1431 = \ ((_statementsImatchIO) :: IO ()) ->
_statementsImatchIO
rule1432 = \ ((_statementsIpatternMatchWarnings) :: [Warning]) ->
_statementsIpatternMatchWarnings
rule1433 = \ ((_statementsIuniqueChunk) :: Int) ->
_statementsIuniqueChunk
rule1434 = \ ((_statementsIuniqueSecondRound) :: Int) ->
_statementsIuniqueSecondRound
rule1435 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1436 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1437 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1438 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1439 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1440 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1441 = \ _constraints ->
_constraints
rule1442 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1443 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1444 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1445 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1446 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1447 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1448 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1449 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1450 = \ _parentTree ->
_parentTree
rule1451 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1452 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1453 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1454 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1455 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Expression_List :: T_Range -> T_Expressions -> T_Expression
sem_Expression_List arg_range_ arg_expressions_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionsX44 = Control.Monad.Identity.runIdentity (attach_T_Expressions (arg_expressions_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expressions_vOut43 _expressionsIassumptions _expressionsIbetaUnique _expressionsIbetas _expressionsIcollectErrors _expressionsIcollectInstances _expressionsIcollectWarnings _expressionsIconstraintslist _expressionsIcounter _expressionsIdictionaryEnvironment _expressionsIinfoTrees _expressionsImatchIO _expressionsImatches _expressionsIpatternMatchWarnings _expressionsIself _expressionsIunboundNames _expressionsIuniqueChunk _expressionsIuniqueSecondRound) = inv_Expressions_s44 _expressionsX44 (T_Expressions_vIn43 _expressionsOallPatterns _expressionsOallTypeSchemes _expressionsOavailablePredicates _expressionsObetaUnique _expressionsOclassEnvironment _expressionsOcollectErrors _expressionsOcollectWarnings _expressionsOcounter _expressionsOcurrentChunk _expressionsOdictionaryEnvironment _expressionsOimportEnvironment _expressionsOmatchIO _expressionsOmonos _expressionsOnamesInScope _expressionsOorderedTypeSynonyms _expressionsOparentTree _expressionsOpatternMatchWarnings _expressionsOsubstitution _expressionsOtryPatterns _expressionsOtypeschemeMap _expressionsOuniqueChunk _expressionsOuniqueSecondRound)
_expressionsObetaUnique = rule1456 _lhsIbetaUnique
_constraints = rule1457 _expressionsIbetas _expressionsIconstraintslist _newcon _zipf
_beta = rule1458 _lhsIbetaUnique
_beta' = rule1459 _lhsIbetaUnique
_newcon = rule1460 _beta _beta' _cinfoResult
_zipf = rule1461 _beta' _cinfoElem
_cinfoElem = rule1462 _beta' _expressionsIbetas _localInfo _parentTree
_cinfoResult = rule1463 _parentTree
_localInfo = rule1464 _beta _lhsImonos _self
_parentTree = rule1465 _expressionsIinfoTrees _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1466 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
(_expressionsOtryPatterns,_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule1467 _constraints _expressionsIassumptions _expressionsImatches _expressionsIuniqueSecondRound _lhsIallPatterns _lhsItryPatterns _localInfo
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1468 _expressionsImatchIO _ioMatch
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1469 _expressionsIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1470 _expressionsIunboundNames
_self = rule1471 _expressionsIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule1472 _self
_lhsObeta :: Tp
_lhsObeta = rule1473 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1474 _expressionsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1475 _expressionsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1476 _expressionsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule1477 _expressionsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1478 _expressionsIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1479 _expressionsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1480 _expressionsIuniqueChunk
_expressionsOallPatterns = rule1481 _lhsIallPatterns
_expressionsOallTypeSchemes = rule1482 _lhsIallTypeSchemes
_expressionsOavailablePredicates = rule1483 _lhsIavailablePredicates
_expressionsOclassEnvironment = rule1484 _lhsIclassEnvironment
_expressionsOcollectErrors = rule1485 _lhsIcollectErrors
_expressionsOcollectWarnings = rule1486 _lhsIcollectWarnings
_expressionsOcounter = rule1487 _lhsIcounter
_expressionsOcurrentChunk = rule1488 _lhsIcurrentChunk
_expressionsOdictionaryEnvironment = rule1489 _lhsIdictionaryEnvironment
_expressionsOimportEnvironment = rule1490 _lhsIimportEnvironment
_expressionsOmatchIO = rule1491 _lhsImatchIO
_expressionsOmonos = rule1492 _lhsImonos
_expressionsOnamesInScope = rule1493 _lhsInamesInScope
_expressionsOorderedTypeSynonyms = rule1494 _lhsIorderedTypeSynonyms
_expressionsOparentTree = rule1495 _parentTree
_expressionsOpatternMatchWarnings = rule1496 _lhsIpatternMatchWarnings
_expressionsOsubstitution = rule1497 _lhsIsubstitution
_expressionsOtypeschemeMap = rule1498 _lhsItypeschemeMap
_expressionsOuniqueChunk = rule1499 _lhsIuniqueChunk
_expressionsOuniqueSecondRound = rule1500 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1456 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 2
rule1457 = \ ((_expressionsIbetas) :: Tps) ((_expressionsIconstraintslist) :: ConstraintSets) _newcon _zipf ->
_newcon .>.
Node (zipWith3 _zipf _expressionsIbetas [0..] _expressionsIconstraintslist)
rule1458 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1459 = \ ((_lhsIbetaUnique) :: Int) ->
TVar (_lhsIbetaUnique + 1)
rule1460 = \ _beta _beta' _cinfoResult ->
[ (listType _beta' .==. _beta) _cinfoResult ]
rule1461 = \ _beta' _cinfoElem ->
\tp childNr ctree -> [ (tp .==. _beta') (_cinfoElem childNr) ] .<. ctree
rule1462 = \ _beta' ((_expressionsIbetas) :: Tps) _localInfo _parentTree ->
\elemNr ->
childConstraint elemNr "element of list" _parentTree $
[ HasTrustFactor 10.0 | length _expressionsIbetas < 2 ] ++
[ Unifier (head (ftv _beta')) ("list", _localInfo, ordinal False (elemNr+1) ++ " element") ]
rule1463 = \ _parentTree ->
resultConstraint "list" _parentTree
[ FolkloreConstraint ]
rule1464 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1465 = \ ((_expressionsIinfoTrees) :: InfoTrees) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo (_expressionsIinfoTrees)
rule1466 = \ _parentTree ->
_parentTree
rule1467 = \ _constraints ((_expressionsIassumptions) :: Assumptions) ((_expressionsImatches) :: [Maybe MetaVariableTable]) ((_expressionsIuniqueSecondRound) :: Int) ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _expressionsIassumptions _localInfo
in match1 infoTuple _expressionsIuniqueSecondRound
match_Expression_List
_lhsItryPatterns _lhsIallPatterns
[_expressionsImatches]
rule1468 = \ ((_expressionsImatchIO) :: IO ()) _ioMatch ->
_expressionsImatchIO >> _ioMatch
rule1469 = \ ((_expressionsIcollectInstances) :: [(Name, Instance)]) ->
_expressionsIcollectInstances
rule1470 = \ ((_expressionsIunboundNames) :: Names) ->
_expressionsIunboundNames
rule1471 = \ ((_expressionsIself) :: Expressions) ((_rangeIself) :: Range) ->
Expression_List _rangeIself _expressionsIself
rule1472 = \ _self ->
_self
rule1473 = \ _beta ->
_beta
rule1474 = \ ((_expressionsIbetaUnique) :: Int) ->
_expressionsIbetaUnique
rule1475 = \ ((_expressionsIcollectErrors) :: TypeErrors) ->
_expressionsIcollectErrors
rule1476 = \ ((_expressionsIcollectWarnings) :: Warnings) ->
_expressionsIcollectWarnings
rule1477 = \ ((_expressionsIcounter) :: Int) ->
_expressionsIcounter
rule1478 = \ ((_expressionsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionsIdictionaryEnvironment
rule1479 = \ ((_expressionsIpatternMatchWarnings) :: [Warning]) ->
_expressionsIpatternMatchWarnings
rule1480 = \ ((_expressionsIuniqueChunk) :: Int) ->
_expressionsIuniqueChunk
rule1481 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1482 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1483 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1484 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1485 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1486 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1487 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1488 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1489 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1490 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1491 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1492 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1493 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1494 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1495 = \ _parentTree ->
_parentTree
rule1496 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1497 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1498 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1499 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1500 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Expression_Tuple :: T_Range -> T_Expressions -> T_Expression
sem_Expression_Tuple arg_range_ arg_expressions_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionsX44 = Control.Monad.Identity.runIdentity (attach_T_Expressions (arg_expressions_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expressions_vOut43 _expressionsIassumptions _expressionsIbetaUnique _expressionsIbetas _expressionsIcollectErrors _expressionsIcollectInstances _expressionsIcollectWarnings _expressionsIconstraintslist _expressionsIcounter _expressionsIdictionaryEnvironment _expressionsIinfoTrees _expressionsImatchIO _expressionsImatches _expressionsIpatternMatchWarnings _expressionsIself _expressionsIunboundNames _expressionsIuniqueChunk _expressionsIuniqueSecondRound) = inv_Expressions_s44 _expressionsX44 (T_Expressions_vIn43 _expressionsOallPatterns _expressionsOallTypeSchemes _expressionsOavailablePredicates _expressionsObetaUnique _expressionsOclassEnvironment _expressionsOcollectErrors _expressionsOcollectWarnings _expressionsOcounter _expressionsOcurrentChunk _expressionsOdictionaryEnvironment _expressionsOimportEnvironment _expressionsOmatchIO _expressionsOmonos _expressionsOnamesInScope _expressionsOorderedTypeSynonyms _expressionsOparentTree _expressionsOpatternMatchWarnings _expressionsOsubstitution _expressionsOtryPatterns _expressionsOtypeschemeMap _expressionsOuniqueChunk _expressionsOuniqueSecondRound)
_expressionsObetaUnique = rule1501 _lhsIbetaUnique
_constraints = rule1502 _expressionsIconstraintslist _newcon
_beta = rule1503 _lhsIbetaUnique
_newcon = rule1504 _beta _cinfo _expressionsIbetas
_cinfo = rule1505 _parentTree
_localInfo = rule1506 _beta _lhsImonos _self
_parentTree = rule1507 _expressionsIinfoTrees _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1508 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
(_expressionsOtryPatterns,_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule1509 _constraints _expressionsIassumptions _expressionsImatches _expressionsIuniqueSecondRound _lhsIallPatterns _lhsItryPatterns _localInfo
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1510 _expressionsImatchIO _ioMatch
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1511 _expressionsIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1512 _expressionsIunboundNames
_self = rule1513 _expressionsIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule1514 _self
_lhsObeta :: Tp
_lhsObeta = rule1515 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1516 _expressionsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1517 _expressionsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1518 _expressionsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule1519 _expressionsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1520 _expressionsIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1521 _expressionsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1522 _expressionsIuniqueChunk
_expressionsOallPatterns = rule1523 _lhsIallPatterns
_expressionsOallTypeSchemes = rule1524 _lhsIallTypeSchemes
_expressionsOavailablePredicates = rule1525 _lhsIavailablePredicates
_expressionsOclassEnvironment = rule1526 _lhsIclassEnvironment
_expressionsOcollectErrors = rule1527 _lhsIcollectErrors
_expressionsOcollectWarnings = rule1528 _lhsIcollectWarnings
_expressionsOcounter = rule1529 _lhsIcounter
_expressionsOcurrentChunk = rule1530 _lhsIcurrentChunk
_expressionsOdictionaryEnvironment = rule1531 _lhsIdictionaryEnvironment
_expressionsOimportEnvironment = rule1532 _lhsIimportEnvironment
_expressionsOmatchIO = rule1533 _lhsImatchIO
_expressionsOmonos = rule1534 _lhsImonos
_expressionsOnamesInScope = rule1535 _lhsInamesInScope
_expressionsOorderedTypeSynonyms = rule1536 _lhsIorderedTypeSynonyms
_expressionsOparentTree = rule1537 _parentTree
_expressionsOpatternMatchWarnings = rule1538 _lhsIpatternMatchWarnings
_expressionsOsubstitution = rule1539 _lhsIsubstitution
_expressionsOtypeschemeMap = rule1540 _lhsItypeschemeMap
_expressionsOuniqueChunk = rule1541 _lhsIuniqueChunk
_expressionsOuniqueSecondRound = rule1542 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1501 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule1502 = \ ((_expressionsIconstraintslist) :: ConstraintSets) _newcon ->
_newcon .>. Node _expressionsIconstraintslist
rule1503 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1504 = \ _beta _cinfo ((_expressionsIbetas) :: Tps) ->
[ (tupleType _expressionsIbetas .==. _beta) _cinfo ]
rule1505 = \ _parentTree ->
resultConstraint "tuple" _parentTree
[ FolkloreConstraint ]
rule1506 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1507 = \ ((_expressionsIinfoTrees) :: InfoTrees) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo (_expressionsIinfoTrees)
rule1508 = \ _parentTree ->
_parentTree
rule1509 = \ _constraints ((_expressionsIassumptions) :: Assumptions) ((_expressionsImatches) :: [Maybe MetaVariableTable]) ((_expressionsIuniqueSecondRound) :: Int) ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _expressionsIassumptions _localInfo
in match1 infoTuple _expressionsIuniqueSecondRound
match_Expression_Tuple
_lhsItryPatterns _lhsIallPatterns
[_expressionsImatches]
rule1510 = \ ((_expressionsImatchIO) :: IO ()) _ioMatch ->
_expressionsImatchIO >> _ioMatch
rule1511 = \ ((_expressionsIcollectInstances) :: [(Name, Instance)]) ->
_expressionsIcollectInstances
rule1512 = \ ((_expressionsIunboundNames) :: Names) ->
_expressionsIunboundNames
rule1513 = \ ((_expressionsIself) :: Expressions) ((_rangeIself) :: Range) ->
Expression_Tuple _rangeIself _expressionsIself
rule1514 = \ _self ->
_self
rule1515 = \ _beta ->
_beta
rule1516 = \ ((_expressionsIbetaUnique) :: Int) ->
_expressionsIbetaUnique
rule1517 = \ ((_expressionsIcollectErrors) :: TypeErrors) ->
_expressionsIcollectErrors
rule1518 = \ ((_expressionsIcollectWarnings) :: Warnings) ->
_expressionsIcollectWarnings
rule1519 = \ ((_expressionsIcounter) :: Int) ->
_expressionsIcounter
rule1520 = \ ((_expressionsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionsIdictionaryEnvironment
rule1521 = \ ((_expressionsIpatternMatchWarnings) :: [Warning]) ->
_expressionsIpatternMatchWarnings
rule1522 = \ ((_expressionsIuniqueChunk) :: Int) ->
_expressionsIuniqueChunk
rule1523 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1524 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1525 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1526 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1527 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1528 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1529 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1530 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1531 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1532 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1533 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1534 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1535 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1536 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1537 = \ _parentTree ->
_parentTree
rule1538 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1539 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1540 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1541 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1542 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Expression_Comprehension :: T_Range -> T_Expression -> T_Qualifiers -> T_Expression
sem_Expression_Comprehension arg_range_ arg_expression_ arg_qualifiers_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
_qualifiersX131 = Control.Monad.Identity.runIdentity (attach_T_Qualifiers (arg_qualifiers_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
(T_Qualifiers_vOut130 _qualifiersIassumptions _qualifiersIbetaUnique _qualifiersIcollectErrors _qualifiersIcollectInstances _qualifiersIcollectWarnings _qualifiersIconstraints _qualifiersIcounter _qualifiersIdictionaryEnvironment _qualifiersIinfoTrees _qualifiersImatchIO _qualifiersImonos _qualifiersInamesInScope _qualifiersIpatternMatchWarnings _qualifiersIself _qualifiersIunboundNames _qualifiersIuniqueChunk _qualifiersIuniqueSecondRound) = inv_Qualifiers_s131 _qualifiersX131 (T_Qualifiers_vIn130 _qualifiersOallPatterns _qualifiersOallTypeSchemes _qualifiersOassumptions _qualifiersOavailablePredicates _qualifiersObetaUnique _qualifiersOclassEnvironment _qualifiersOcollectErrors _qualifiersOcollectWarnings _qualifiersOconstraints _qualifiersOcounter _qualifiersOcurrentChunk _qualifiersOdictionaryEnvironment _qualifiersOimportEnvironment _qualifiersOmatchIO _qualifiersOmonos _qualifiersOnamesInScope _qualifiersOorderedTypeSynonyms _qualifiersOparentTree _qualifiersOpatternMatchWarnings _qualifiersOsubstitution _qualifiersOtypeschemeMap _qualifiersOunboundNames _qualifiersOuniqueChunk _qualifiersOuniqueSecondRound)
_expressionObetaUnique = rule1543 _lhsIbetaUnique
_expressionOmonos = rule1544 _qualifiersImonos
_qualifiersOassumptions = rule1545 _expressionIassumptions
_qualifiersOconstraints = rule1546 _expressionIconstraints
_qualifiersOmonos = rule1547 _lhsImonos
_assumptions = rule1548 _qualifiersIassumptions
_constraints = rule1549 _newcon _qualifiersIconstraints
_beta = rule1550 _lhsIbetaUnique
_newcon = rule1551 _beta _cinfo _expressionIbeta
_cinfo = rule1552 _parentTree
_localInfo = rule1553 _beta _lhsImonos _self
_parentTree = rule1554 _lhsIparentTree _localInfo _qualifiersIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1555 _parentTree
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1556 _qualifiersIunboundNames
_expressionOnamesInScope = rule1557 _qualifiersInamesInScope
_qualifiersOnamesInScope = rule1558 _lhsInamesInScope
_qualifiersOunboundNames = rule1559 _expressionIunboundNames
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule1560 _assumptions _constraints _lhsItryPatterns _localInfo
_expressionOtryPatterns = rule1561 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1562 _expressionIcollectInstances _qualifiersIcollectInstances
_self = rule1563 _expressionIself _qualifiersIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule1564 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule1565 _assumptions
_lhsObeta :: Tp
_lhsObeta = rule1566 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1567 _qualifiersIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1568 _qualifiersIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1569 _qualifiersIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule1570 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule1571 _qualifiersIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1572 _qualifiersIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1573 _qualifiersImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1574 _qualifiersIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1575 _qualifiersIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule1576 _qualifiersIuniqueSecondRound
_expressionOallPatterns = rule1577 _lhsIallPatterns
_expressionOallTypeSchemes = rule1578 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule1579 _lhsIavailablePredicates
_expressionOclassEnvironment = rule1580 _lhsIclassEnvironment
_expressionOcollectErrors = rule1581 _lhsIcollectErrors
_expressionOcollectWarnings = rule1582 _lhsIcollectWarnings
_expressionOcounter = rule1583 _lhsIcounter
_expressionOcurrentChunk = rule1584 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule1585 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule1586 _lhsIimportEnvironment
_expressionOmatchIO = rule1587 _lhsImatchIO
_expressionOorderedTypeSynonyms = rule1588 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule1589 _parentTree
_expressionOpatternMatchWarnings = rule1590 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule1591 _lhsIsubstitution
_expressionOtypeschemeMap = rule1592 _lhsItypeschemeMap
_expressionOuniqueChunk = rule1593 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule1594 _lhsIuniqueSecondRound
_qualifiersOallPatterns = rule1595 _lhsIallPatterns
_qualifiersOallTypeSchemes = rule1596 _lhsIallTypeSchemes
_qualifiersOavailablePredicates = rule1597 _lhsIavailablePredicates
_qualifiersObetaUnique = rule1598 _expressionIbetaUnique
_qualifiersOclassEnvironment = rule1599 _lhsIclassEnvironment
_qualifiersOcollectErrors = rule1600 _expressionIcollectErrors
_qualifiersOcollectWarnings = rule1601 _expressionIcollectWarnings
_qualifiersOcounter = rule1602 _expressionIcounter
_qualifiersOcurrentChunk = rule1603 _lhsIcurrentChunk
_qualifiersOdictionaryEnvironment = rule1604 _expressionIdictionaryEnvironment
_qualifiersOimportEnvironment = rule1605 _lhsIimportEnvironment
_qualifiersOmatchIO = rule1606 _expressionImatchIO
_qualifiersOorderedTypeSynonyms = rule1607 _lhsIorderedTypeSynonyms
_qualifiersOparentTree = rule1608 _parentTree
_qualifiersOpatternMatchWarnings = rule1609 _expressionIpatternMatchWarnings
_qualifiersOsubstitution = rule1610 _lhsIsubstitution
_qualifiersOtypeschemeMap = rule1611 _lhsItypeschemeMap
_qualifiersOuniqueChunk = rule1612 _expressionIuniqueChunk
_qualifiersOuniqueSecondRound = rule1613 _expressionIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1543 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule1544 = \ ((_qualifiersImonos) :: Monos) ->
_qualifiersImonos
rule1545 = \ ((_expressionIassumptions) :: Assumptions) ->
_expressionIassumptions
rule1546 = \ ((_expressionIconstraints) :: ConstraintSet) ->
_expressionIconstraints
rule1547 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1548 = \ ((_qualifiersIassumptions) :: Assumptions) ->
_qualifiersIassumptions
rule1549 = \ _newcon ((_qualifiersIconstraints) :: ConstraintSet) ->
_newcon .>. Node [ _qualifiersIconstraints ]
rule1550 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1551 = \ _beta _cinfo ((_expressionIbeta) :: Tp) ->
[ (listType _expressionIbeta .==. _beta) _cinfo ]
rule1552 = \ _parentTree ->
resultConstraint "list comprehension" _parentTree
[ FolkloreConstraint ]
rule1553 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1554 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ((_qualifiersIinfoTrees) :: InfoTrees) ->
node _lhsIparentTree _localInfo _qualifiersIinfoTrees
rule1555 = \ _parentTree ->
_parentTree
rule1556 = \ ((_qualifiersIunboundNames) :: Names) ->
_qualifiersIunboundNames
rule1557 = \ ((_qualifiersInamesInScope) :: Names) ->
_qualifiersInamesInScope
rule1558 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1559 = \ ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames
rule1560 = \ _assumptions _constraints ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in matchOnlyVariable infoTuple _lhsItryPatterns
rule1561 = \ (_ :: ()) ->
[]
rule1562 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ((_qualifiersIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances ++ _qualifiersIcollectInstances
rule1563 = \ ((_expressionIself) :: Expression) ((_qualifiersIself) :: Qualifiers) ((_rangeIself) :: Range) ->
Expression_Comprehension _rangeIself _expressionIself _qualifiersIself
rule1564 = \ _self ->
_self
rule1565 = \ _assumptions ->
_assumptions
rule1566 = \ _beta ->
_beta
rule1567 = \ ((_qualifiersIbetaUnique) :: Int) ->
_qualifiersIbetaUnique
rule1568 = \ ((_qualifiersIcollectErrors) :: TypeErrors) ->
_qualifiersIcollectErrors
rule1569 = \ ((_qualifiersIcollectWarnings) :: Warnings) ->
_qualifiersIcollectWarnings
rule1570 = \ _constraints ->
_constraints
rule1571 = \ ((_qualifiersIcounter) :: Int) ->
_qualifiersIcounter
rule1572 = \ ((_qualifiersIdictionaryEnvironment) :: DictionaryEnvironment) ->
_qualifiersIdictionaryEnvironment
rule1573 = \ ((_qualifiersImatchIO) :: IO ()) ->
_qualifiersImatchIO
rule1574 = \ ((_qualifiersIpatternMatchWarnings) :: [Warning]) ->
_qualifiersIpatternMatchWarnings
rule1575 = \ ((_qualifiersIuniqueChunk) :: Int) ->
_qualifiersIuniqueChunk
rule1576 = \ ((_qualifiersIuniqueSecondRound) :: Int) ->
_qualifiersIuniqueSecondRound
rule1577 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1578 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1579 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1580 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1581 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1582 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1583 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1584 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1585 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1586 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1587 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1588 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1589 = \ _parentTree ->
_parentTree
rule1590 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1591 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1592 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1593 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1594 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule1595 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1596 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1597 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1598 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule1599 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1600 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule1601 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule1602 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule1603 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1604 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule1605 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1606 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule1607 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1608 = \ _parentTree ->
_parentTree
rule1609 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule1610 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1611 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1612 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule1613 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
sem_Expression_Typed :: T_Range -> T_Expression -> T_Type -> T_Expression
sem_Expression_Typed arg_range_ arg_expression_ arg_type_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
_typeX164 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_type_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
(T_Type_vOut163 _typeIself) = inv_Type_s164 _typeX164 (T_Type_vIn163 )
_expressionObetaUnique = rule1614 _lhsIbetaUnique
_assumptions = rule1615 _expressionIassumptions
_constraints = rule1616 _conExpr _conResult _expressionIconstraints
_beta = rule1617 _lhsIbetaUnique
_typeScheme = rule1618 _typeIself
_conResult = rule1619 _beta _cinfoResult _typeScheme
_conExpr = rule1620 _cinfoExpr _expressionIbeta _lhsImonos _typeScheme
_cinfoExpr = rule1621 _parentTree _typeIself
_cinfoResult = rule1622 _parentTree
_localInfo = rule1623 _beta _lhsImonos _self
_parentTree = rule1624 _expressionIinfoTree _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1625 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule1626 _assumptions _constraints _lhsItryPatterns _localInfo
_expressionOtryPatterns = rule1627 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1628 _expressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1629 _expressionIunboundNames
_self = rule1630 _expressionIself _rangeIself _typeIself
_lhsOself :: Expression
_lhsOself = rule1631 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule1632 _assumptions
_lhsObeta :: Tp
_lhsObeta = rule1633 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1634 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1635 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1636 _expressionIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule1637 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule1638 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1639 _expressionIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1640 _expressionImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1641 _expressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1642 _expressionIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule1643 _expressionIuniqueSecondRound
_expressionOallPatterns = rule1644 _lhsIallPatterns
_expressionOallTypeSchemes = rule1645 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule1646 _lhsIavailablePredicates
_expressionOclassEnvironment = rule1647 _lhsIclassEnvironment
_expressionOcollectErrors = rule1648 _lhsIcollectErrors
_expressionOcollectWarnings = rule1649 _lhsIcollectWarnings
_expressionOcounter = rule1650 _lhsIcounter
_expressionOcurrentChunk = rule1651 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule1652 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule1653 _lhsIimportEnvironment
_expressionOmatchIO = rule1654 _lhsImatchIO
_expressionOmonos = rule1655 _lhsImonos
_expressionOnamesInScope = rule1656 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule1657 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule1658 _parentTree
_expressionOpatternMatchWarnings = rule1659 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule1660 _lhsIsubstitution
_expressionOtypeschemeMap = rule1661 _lhsItypeschemeMap
_expressionOuniqueChunk = rule1662 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule1663 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1614 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule1615 = \ ((_expressionIassumptions) :: Assumptions) ->
_expressionIassumptions
rule1616 = \ _conExpr _conResult ((_expressionIconstraints) :: ConstraintSet) ->
_conResult .>.
Node [ _conExpr .<. _expressionIconstraints ]
rule1617 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1618 = \ ((_typeIself) :: Type) ->
makeTpSchemeFromType _typeIself
rule1619 = \ _beta _cinfoResult _typeScheme ->
[ (_beta .::. _typeScheme) _cinfoResult ]
rule1620 = \ _cinfoExpr ((_expressionIbeta) :: Tp) ((_lhsImonos) :: Monos) _typeScheme ->
[ (_expressionIbeta !::! _typeScheme) _lhsImonos _cinfoExpr ]
rule1621 = \ _parentTree ((_typeIself) :: Type) ->
childConstraint 0 "type annotation" _parentTree
[ TypeSignatureLocation (getTypeRange _typeIself) ]
rule1622 = \ _parentTree ->
resultConstraint "type annotation" _parentTree
[ FolkloreConstraint ]
rule1623 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1624 = \ ((_expressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo [_expressionIinfoTree]
rule1625 = \ _parentTree ->
_parentTree
rule1626 = \ _assumptions _constraints ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in matchOnlyVariable infoTuple _lhsItryPatterns
rule1627 = \ (_ :: ()) ->
[]
rule1628 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule1629 = \ ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames
rule1630 = \ ((_expressionIself) :: Expression) ((_rangeIself) :: Range) ((_typeIself) :: Type) ->
Expression_Typed _rangeIself _expressionIself _typeIself
rule1631 = \ _self ->
_self
rule1632 = \ _assumptions ->
_assumptions
rule1633 = \ _beta ->
_beta
rule1634 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule1635 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule1636 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule1637 = \ _constraints ->
_constraints
rule1638 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule1639 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule1640 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule1641 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule1642 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule1643 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule1644 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1645 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1646 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1647 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1648 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1649 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1650 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1651 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1652 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1653 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1654 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1655 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1656 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1657 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1658 = \ _parentTree ->
_parentTree
rule1659 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1660 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1661 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1662 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1663 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Expression_RecordConstruction :: T_Range -> T_Name -> T_RecordExpressionBindings -> T_Expression
sem_Expression_RecordConstruction arg_range_ arg_name_ arg_recordExpressionBindings_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_recordExpressionBindingsX140 = Control.Monad.Identity.runIdentity (attach_T_RecordExpressionBindings (arg_recordExpressionBindings_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_RecordExpressionBindings_vOut139 _recordExpressionBindingsIcollectErrors _recordExpressionBindingsIcollectInstances _recordExpressionBindingsIcollectWarnings _recordExpressionBindingsIcounter _recordExpressionBindingsIdictionaryEnvironment _recordExpressionBindingsIpatternMatchWarnings _recordExpressionBindingsIself _recordExpressionBindingsIunboundNames _recordExpressionBindingsIuniqueChunk) = inv_RecordExpressionBindings_s140 _recordExpressionBindingsX140 (T_RecordExpressionBindings_vIn139 _recordExpressionBindingsOallTypeSchemes _recordExpressionBindingsOavailablePredicates _recordExpressionBindingsOclassEnvironment _recordExpressionBindingsOcollectErrors _recordExpressionBindingsOcollectWarnings _recordExpressionBindingsOcounter _recordExpressionBindingsOcurrentChunk _recordExpressionBindingsOdictionaryEnvironment _recordExpressionBindingsOimportEnvironment _recordExpressionBindingsOnamesInScope _recordExpressionBindingsOorderedTypeSynonyms _recordExpressionBindingsOpatternMatchWarnings _recordExpressionBindingsOsubstitution _recordExpressionBindingsOtypeschemeMap _recordExpressionBindingsOuniqueChunk)
_infoTree = rule1664 ()
(_assumptions,_constraints,_beta) = rule1665 ()
_matches = rule1666 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1667 _recordExpressionBindingsIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1668 _recordExpressionBindingsIunboundNames
_self = rule1669 _nameIself _rangeIself _recordExpressionBindingsIself
_lhsOself :: Expression
_lhsOself = rule1670 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule1671 _assumptions
_lhsObeta :: Tp
_lhsObeta = rule1672 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1673 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1674 _recordExpressionBindingsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1675 _recordExpressionBindingsIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule1676 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule1677 _recordExpressionBindingsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1678 _recordExpressionBindingsIdictionaryEnvironment
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1679 _infoTree
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1680 _lhsImatchIO
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule1681 _matches
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1682 _recordExpressionBindingsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1683 _recordExpressionBindingsIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule1684 _lhsIuniqueSecondRound
_recordExpressionBindingsOallTypeSchemes = rule1685 _lhsIallTypeSchemes
_recordExpressionBindingsOavailablePredicates = rule1686 _lhsIavailablePredicates
_recordExpressionBindingsOclassEnvironment = rule1687 _lhsIclassEnvironment
_recordExpressionBindingsOcollectErrors = rule1688 _lhsIcollectErrors
_recordExpressionBindingsOcollectWarnings = rule1689 _lhsIcollectWarnings
_recordExpressionBindingsOcounter = rule1690 _lhsIcounter
_recordExpressionBindingsOcurrentChunk = rule1691 _lhsIcurrentChunk
_recordExpressionBindingsOdictionaryEnvironment = rule1692 _lhsIdictionaryEnvironment
_recordExpressionBindingsOimportEnvironment = rule1693 _lhsIimportEnvironment
_recordExpressionBindingsOnamesInScope = rule1694 _lhsInamesInScope
_recordExpressionBindingsOorderedTypeSynonyms = rule1695 _lhsIorderedTypeSynonyms
_recordExpressionBindingsOpatternMatchWarnings = rule1696 _lhsIpatternMatchWarnings
_recordExpressionBindingsOsubstitution = rule1697 _lhsIsubstitution
_recordExpressionBindingsOtypeschemeMap = rule1698 _lhsItypeschemeMap
_recordExpressionBindingsOuniqueChunk = rule1699 _lhsIuniqueChunk
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1664 = \ (_ :: ()) ->
globalInfoError
rule1665 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "Expression.RecordConstruction"
rule1666 = \ (_ :: ()) ->
internalError "TS_PatternMatching.ag" "n/a" "RecordConstruction is not supported"
rule1667 = \ ((_recordExpressionBindingsIcollectInstances) :: [(Name, Instance)]) ->
_recordExpressionBindingsIcollectInstances
rule1668 = \ ((_recordExpressionBindingsIunboundNames) :: Names) ->
_recordExpressionBindingsIunboundNames
rule1669 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ((_recordExpressionBindingsIself) :: RecordExpressionBindings) ->
Expression_RecordConstruction _rangeIself _nameIself _recordExpressionBindingsIself
rule1670 = \ _self ->
_self
rule1671 = \ _assumptions ->
_assumptions
rule1672 = \ _beta ->
_beta
rule1673 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule1674 = \ ((_recordExpressionBindingsIcollectErrors) :: TypeErrors) ->
_recordExpressionBindingsIcollectErrors
rule1675 = \ ((_recordExpressionBindingsIcollectWarnings) :: Warnings) ->
_recordExpressionBindingsIcollectWarnings
rule1676 = \ _constraints ->
_constraints
rule1677 = \ ((_recordExpressionBindingsIcounter) :: Int) ->
_recordExpressionBindingsIcounter
rule1678 = \ ((_recordExpressionBindingsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_recordExpressionBindingsIdictionaryEnvironment
rule1679 = \ _infoTree ->
_infoTree
rule1680 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1681 = \ _matches ->
_matches
rule1682 = \ ((_recordExpressionBindingsIpatternMatchWarnings) :: [Warning]) ->
_recordExpressionBindingsIpatternMatchWarnings
rule1683 = \ ((_recordExpressionBindingsIuniqueChunk) :: Int) ->
_recordExpressionBindingsIuniqueChunk
rule1684 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule1685 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1686 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1687 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1688 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1689 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1690 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1691 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1692 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1693 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1694 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1695 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1696 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1697 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1698 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1699 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Expression_RecordUpdate :: T_Range -> T_Expression -> T_RecordExpressionBindings -> T_Expression
sem_Expression_RecordUpdate arg_range_ arg_expression_ arg_recordExpressionBindings_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
_recordExpressionBindingsX140 = Control.Monad.Identity.runIdentity (attach_T_RecordExpressionBindings (arg_recordExpressionBindings_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
(T_RecordExpressionBindings_vOut139 _recordExpressionBindingsIcollectErrors _recordExpressionBindingsIcollectInstances _recordExpressionBindingsIcollectWarnings _recordExpressionBindingsIcounter _recordExpressionBindingsIdictionaryEnvironment _recordExpressionBindingsIpatternMatchWarnings _recordExpressionBindingsIself _recordExpressionBindingsIunboundNames _recordExpressionBindingsIuniqueChunk) = inv_RecordExpressionBindings_s140 _recordExpressionBindingsX140 (T_RecordExpressionBindings_vIn139 _recordExpressionBindingsOallTypeSchemes _recordExpressionBindingsOavailablePredicates _recordExpressionBindingsOclassEnvironment _recordExpressionBindingsOcollectErrors _recordExpressionBindingsOcollectWarnings _recordExpressionBindingsOcounter _recordExpressionBindingsOcurrentChunk _recordExpressionBindingsOdictionaryEnvironment _recordExpressionBindingsOimportEnvironment _recordExpressionBindingsOnamesInScope _recordExpressionBindingsOorderedTypeSynonyms _recordExpressionBindingsOpatternMatchWarnings _recordExpressionBindingsOsubstitution _recordExpressionBindingsOtypeschemeMap _recordExpressionBindingsOuniqueChunk)
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1700 _expressionIcollectInstances _recordExpressionBindingsIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1701 _expressionIunboundNames _recordExpressionBindingsIunboundNames
_self = rule1702 _expressionIself _rangeIself _recordExpressionBindingsIself
_lhsOself :: Expression
_lhsOself = rule1703 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule1704 _expressionIassumptions
_lhsObeta :: Tp
_lhsObeta = rule1705 _expressionIbeta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1706 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1707 _recordExpressionBindingsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1708 _recordExpressionBindingsIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule1709 _expressionIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule1710 _recordExpressionBindingsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1711 _recordExpressionBindingsIdictionaryEnvironment
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1712 _expressionIinfoTree
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1713 _expressionImatchIO
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOmatches = rule1714 _expressionImatches
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1715 _recordExpressionBindingsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1716 _recordExpressionBindingsIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule1717 _expressionIuniqueSecondRound
_expressionOallPatterns = rule1718 _lhsIallPatterns
_expressionOallTypeSchemes = rule1719 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule1720 _lhsIavailablePredicates
_expressionObetaUnique = rule1721 _lhsIbetaUnique
_expressionOclassEnvironment = rule1722 _lhsIclassEnvironment
_expressionOcollectErrors = rule1723 _lhsIcollectErrors
_expressionOcollectWarnings = rule1724 _lhsIcollectWarnings
_expressionOcounter = rule1725 _lhsIcounter
_expressionOcurrentChunk = rule1726 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule1727 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule1728 _lhsIimportEnvironment
_expressionOmatchIO = rule1729 _lhsImatchIO
_expressionOmonos = rule1730 _lhsImonos
_expressionOnamesInScope = rule1731 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule1732 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule1733 _lhsIparentTree
_expressionOpatternMatchWarnings = rule1734 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule1735 _lhsIsubstitution
_expressionOtryPatterns = rule1736 _lhsItryPatterns
_expressionOtypeschemeMap = rule1737 _lhsItypeschemeMap
_expressionOuniqueChunk = rule1738 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule1739 _lhsIuniqueSecondRound
_recordExpressionBindingsOallTypeSchemes = rule1740 _lhsIallTypeSchemes
_recordExpressionBindingsOavailablePredicates = rule1741 _lhsIavailablePredicates
_recordExpressionBindingsOclassEnvironment = rule1742 _lhsIclassEnvironment
_recordExpressionBindingsOcollectErrors = rule1743 _expressionIcollectErrors
_recordExpressionBindingsOcollectWarnings = rule1744 _expressionIcollectWarnings
_recordExpressionBindingsOcounter = rule1745 _expressionIcounter
_recordExpressionBindingsOcurrentChunk = rule1746 _lhsIcurrentChunk
_recordExpressionBindingsOdictionaryEnvironment = rule1747 _expressionIdictionaryEnvironment
_recordExpressionBindingsOimportEnvironment = rule1748 _lhsIimportEnvironment
_recordExpressionBindingsOnamesInScope = rule1749 _lhsInamesInScope
_recordExpressionBindingsOorderedTypeSynonyms = rule1750 _lhsIorderedTypeSynonyms
_recordExpressionBindingsOpatternMatchWarnings = rule1751 _expressionIpatternMatchWarnings
_recordExpressionBindingsOsubstitution = rule1752 _lhsIsubstitution
_recordExpressionBindingsOtypeschemeMap = rule1753 _lhsItypeschemeMap
_recordExpressionBindingsOuniqueChunk = rule1754 _expressionIuniqueChunk
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1700 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ((_recordExpressionBindingsIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances ++ _recordExpressionBindingsIcollectInstances
rule1701 = \ ((_expressionIunboundNames) :: Names) ((_recordExpressionBindingsIunboundNames) :: Names) ->
_expressionIunboundNames ++ _recordExpressionBindingsIunboundNames
rule1702 = \ ((_expressionIself) :: Expression) ((_rangeIself) :: Range) ((_recordExpressionBindingsIself) :: RecordExpressionBindings) ->
Expression_RecordUpdate _rangeIself _expressionIself _recordExpressionBindingsIself
rule1703 = \ _self ->
_self
rule1704 = \ ((_expressionIassumptions) :: Assumptions) ->
_expressionIassumptions
rule1705 = \ ((_expressionIbeta) :: Tp) ->
_expressionIbeta
rule1706 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule1707 = \ ((_recordExpressionBindingsIcollectErrors) :: TypeErrors) ->
_recordExpressionBindingsIcollectErrors
rule1708 = \ ((_recordExpressionBindingsIcollectWarnings) :: Warnings) ->
_recordExpressionBindingsIcollectWarnings
rule1709 = \ ((_expressionIconstraints) :: ConstraintSet) ->
_expressionIconstraints
rule1710 = \ ((_recordExpressionBindingsIcounter) :: Int) ->
_recordExpressionBindingsIcounter
rule1711 = \ ((_recordExpressionBindingsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_recordExpressionBindingsIdictionaryEnvironment
rule1712 = \ ((_expressionIinfoTree) :: InfoTree) ->
_expressionIinfoTree
rule1713 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule1714 = \ ((_expressionImatches) :: [Maybe MetaVariableTable]) ->
_expressionImatches
rule1715 = \ ((_recordExpressionBindingsIpatternMatchWarnings) :: [Warning]) ->
_recordExpressionBindingsIpatternMatchWarnings
rule1716 = \ ((_recordExpressionBindingsIuniqueChunk) :: Int) ->
_recordExpressionBindingsIuniqueChunk
rule1717 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule1718 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1719 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1720 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1721 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule1722 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1723 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1724 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1725 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1726 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1727 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1728 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1729 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1730 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1731 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1732 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1733 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule1734 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1735 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1736 = \ ((_lhsItryPatterns) :: [(Expression , [String])]) ->
_lhsItryPatterns
rule1737 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1738 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1739 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule1740 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1741 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1742 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1743 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule1744 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule1745 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule1746 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1747 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule1748 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1749 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1750 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1751 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule1752 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1753 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1754 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
sem_Expression_Enum :: T_Range -> T_Expression -> T_MaybeExpression -> T_MaybeExpression -> T_Expression
sem_Expression_Enum arg_range_ arg_from_ arg_then_ arg_to_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_fromX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_from_))
_thenX95 = Control.Monad.Identity.runIdentity (attach_T_MaybeExpression (arg_then_))
_toX95 = Control.Monad.Identity.runIdentity (attach_T_MaybeExpression (arg_to_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _fromIassumptions _fromIbeta _fromIbetaUnique _fromIcollectErrors _fromIcollectInstances _fromIcollectWarnings _fromIconstraints _fromIcounter _fromIdictionaryEnvironment _fromIinfoTree _fromImatchIO _fromImatches _fromIpatternMatchWarnings _fromIself _fromIunboundNames _fromIuniqueChunk _fromIuniqueSecondRound) = inv_Expression_s41 _fromX41 (T_Expression_vIn40 _fromOallPatterns _fromOallTypeSchemes _fromOavailablePredicates _fromObetaUnique _fromOclassEnvironment _fromOcollectErrors _fromOcollectWarnings _fromOcounter _fromOcurrentChunk _fromOdictionaryEnvironment _fromOimportEnvironment _fromOmatchIO _fromOmonos _fromOnamesInScope _fromOorderedTypeSynonyms _fromOparentTree _fromOpatternMatchWarnings _fromOsubstitution _fromOtryPatterns _fromOtypeschemeMap _fromOuniqueChunk _fromOuniqueSecondRound)
(T_MaybeExpression_vOut94 _thenIassumptions _thenIbeta _thenIbetaUnique _thenIcollectErrors _thenIcollectInstances _thenIcollectWarnings _thenIconstraints _thenIcounter _thenIdictionaryEnvironment _thenIinfoTrees _thenImatchIO _thenImatches _thenIpatternMatchWarnings _thenIsection _thenIself _thenIunboundNames _thenIuniqueChunk _thenIuniqueSecondRound) = inv_MaybeExpression_s95 _thenX95 (T_MaybeExpression_vIn94 _thenOallPatterns _thenOallTypeSchemes _thenOavailablePredicates _thenObetaUnique _thenOclassEnvironment _thenOcollectErrors _thenOcollectWarnings _thenOcounter _thenOcurrentChunk _thenOdictionaryEnvironment _thenOimportEnvironment _thenOmatchIO _thenOmonos _thenOnamesInScope _thenOorderedTypeSynonyms _thenOparentTree _thenOpatternMatchWarnings _thenOsubstitution _thenOtryPatterns _thenOtypeschemeMap _thenOuniqueChunk _thenOuniqueSecondRound)
(T_MaybeExpression_vOut94 _toIassumptions _toIbeta _toIbetaUnique _toIcollectErrors _toIcollectInstances _toIcollectWarnings _toIconstraints _toIcounter _toIdictionaryEnvironment _toIinfoTrees _toImatchIO _toImatches _toIpatternMatchWarnings _toIsection _toIself _toIunboundNames _toIuniqueChunk _toIuniqueSecondRound) = inv_MaybeExpression_s95 _toX95 (T_MaybeExpression_vIn94 _toOallPatterns _toOallTypeSchemes _toOavailablePredicates _toObetaUnique _toOclassEnvironment _toOcollectErrors _toOcollectWarnings _toOcounter _toOcurrentChunk _toOdictionaryEnvironment _toOimportEnvironment _toOmatchIO _toOmonos _toOnamesInScope _toOorderedTypeSynonyms _toOparentTree _toOpatternMatchWarnings _toOsubstitution _toOtryPatterns _toOtypeschemeMap _toOuniqueChunk _toOuniqueSecondRound)
_fromObetaUnique = rule1755 _lhsIbetaUnique _overloaded
_assumptions = rule1756 _fromIassumptions _thenIassumptions _toIassumptions
_constraints = rule1757 _conFrom _conList _conPredicate _conThen _conTo _fromIconstraints _thenIconstraints _toIconstraints
_beta = rule1758 _lhsIbetaUnique
_overloaded = rule1759 _lhsIimportEnvironment
_elementType = rule1760 _lhsIbetaUnique _overloaded
_conPredicate = rule1761 _cinfoPred _elementType _overloaded
_conList = rule1762 _beta _cinfoResult _elementType
_conFrom = rule1763 _cinfoFrom _elementType _fromIbeta
_conThen = rule1764 _cinfoThen _elementType _thenIbeta
_conTo = rule1765 _cinfoTo _elementType _toIbeta
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1766 _newDEnv
_localName = rule1767 _rangeIself _thenIsection _toIsection
_requiredDictionaries = rule1768 _elementType _lhsIsubstitution _overloaded
_newDEnv = rule1769 _lhsIavailablePredicates _lhsIclassEnvironment _lhsIsubstitution _localName _requiredDictionaries _toIdictionaryEnvironment
_cinfoFrom = rule1770 _parentTree
_cinfoThen = rule1771 _parentTree
_toChildNr = rule1772 _thenIinfoTrees
_cinfoTo = rule1773 _parentTree _toChildNr
_cinfoResult = rule1774 _parentTree
_cinfoPred = rule1775 _elementType _parentTree
_localInfo = rule1776 _beta _lhsImonos _self
_parentTree = rule1777 _fromIinfoTree _lhsIparentTree _localInfo _thenIinfoTrees _toIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1778 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
((_fromOtryPatterns,_thenOtryPatterns,_toOtryPatterns),_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule1779 _assumptions _constraints _fromImatches _lhsIallPatterns _lhsItryPatterns _localInfo _thenImatches _toImatches _toIuniqueSecondRound
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1780 _ioMatch _toImatchIO
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1781 _fromIcollectInstances _thenIcollectInstances _toIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1782 _fromIunboundNames _thenIunboundNames _toIunboundNames
_self = rule1783 _fromIself _rangeIself _thenIself _toIself
_lhsOself :: Expression
_lhsOself = rule1784 _self
_lhsObeta :: Tp
_lhsObeta = rule1785 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1786 _toIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1787 _toIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1788 _toIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule1789 _toIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1790 _toIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1791 _toIuniqueChunk
_fromOallPatterns = rule1792 _lhsIallPatterns
_fromOallTypeSchemes = rule1793 _lhsIallTypeSchemes
_fromOavailablePredicates = rule1794 _lhsIavailablePredicates
_fromOclassEnvironment = rule1795 _lhsIclassEnvironment
_fromOcollectErrors = rule1796 _lhsIcollectErrors
_fromOcollectWarnings = rule1797 _lhsIcollectWarnings
_fromOcounter = rule1798 _lhsIcounter
_fromOcurrentChunk = rule1799 _lhsIcurrentChunk
_fromOdictionaryEnvironment = rule1800 _lhsIdictionaryEnvironment
_fromOimportEnvironment = rule1801 _lhsIimportEnvironment
_fromOmatchIO = rule1802 _lhsImatchIO
_fromOmonos = rule1803 _lhsImonos
_fromOnamesInScope = rule1804 _lhsInamesInScope
_fromOorderedTypeSynonyms = rule1805 _lhsIorderedTypeSynonyms
_fromOparentTree = rule1806 _parentTree
_fromOpatternMatchWarnings = rule1807 _lhsIpatternMatchWarnings
_fromOsubstitution = rule1808 _lhsIsubstitution
_fromOtypeschemeMap = rule1809 _lhsItypeschemeMap
_fromOuniqueChunk = rule1810 _lhsIuniqueChunk
_fromOuniqueSecondRound = rule1811 _lhsIuniqueSecondRound
_thenOallPatterns = rule1812 _lhsIallPatterns
_thenOallTypeSchemes = rule1813 _lhsIallTypeSchemes
_thenOavailablePredicates = rule1814 _lhsIavailablePredicates
_thenObetaUnique = rule1815 _fromIbetaUnique
_thenOclassEnvironment = rule1816 _lhsIclassEnvironment
_thenOcollectErrors = rule1817 _fromIcollectErrors
_thenOcollectWarnings = rule1818 _fromIcollectWarnings
_thenOcounter = rule1819 _fromIcounter
_thenOcurrentChunk = rule1820 _lhsIcurrentChunk
_thenOdictionaryEnvironment = rule1821 _fromIdictionaryEnvironment
_thenOimportEnvironment = rule1822 _lhsIimportEnvironment
_thenOmatchIO = rule1823 _fromImatchIO
_thenOmonos = rule1824 _lhsImonos
_thenOnamesInScope = rule1825 _lhsInamesInScope
_thenOorderedTypeSynonyms = rule1826 _lhsIorderedTypeSynonyms
_thenOparentTree = rule1827 _parentTree
_thenOpatternMatchWarnings = rule1828 _fromIpatternMatchWarnings
_thenOsubstitution = rule1829 _lhsIsubstitution
_thenOtypeschemeMap = rule1830 _lhsItypeschemeMap
_thenOuniqueChunk = rule1831 _fromIuniqueChunk
_thenOuniqueSecondRound = rule1832 _fromIuniqueSecondRound
_toOallPatterns = rule1833 _lhsIallPatterns
_toOallTypeSchemes = rule1834 _lhsIallTypeSchemes
_toOavailablePredicates = rule1835 _lhsIavailablePredicates
_toObetaUnique = rule1836 _thenIbetaUnique
_toOclassEnvironment = rule1837 _lhsIclassEnvironment
_toOcollectErrors = rule1838 _thenIcollectErrors
_toOcollectWarnings = rule1839 _thenIcollectWarnings
_toOcounter = rule1840 _thenIcounter
_toOcurrentChunk = rule1841 _lhsIcurrentChunk
_toOdictionaryEnvironment = rule1842 _thenIdictionaryEnvironment
_toOimportEnvironment = rule1843 _lhsIimportEnvironment
_toOmatchIO = rule1844 _thenImatchIO
_toOmonos = rule1845 _lhsImonos
_toOnamesInScope = rule1846 _lhsInamesInScope
_toOorderedTypeSynonyms = rule1847 _lhsIorderedTypeSynonyms
_toOparentTree = rule1848 _parentTree
_toOpatternMatchWarnings = rule1849 _thenIpatternMatchWarnings
_toOsubstitution = rule1850 _lhsIsubstitution
_toOtypeschemeMap = rule1851 _lhsItypeschemeMap
_toOuniqueChunk = rule1852 _thenIuniqueChunk
_toOuniqueSecondRound = rule1853 _thenIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1755 = \ ((_lhsIbetaUnique) :: Int) _overloaded ->
_lhsIbetaUnique + (if _overloaded then 2 else 1)
rule1756 = \ ((_fromIassumptions) :: Assumptions) ((_thenIassumptions) :: Assumptions) ((_toIassumptions) :: Assumptions) ->
_fromIassumptions `combine` _thenIassumptions `combine` _toIassumptions
rule1757 = \ _conFrom _conList _conPredicate _conThen _conTo ((_fromIconstraints) :: ConstraintSet) ((_thenIconstraints) :: ConstraintSet) ((_toIconstraints) :: ConstraintSet) ->
(_conList ++ _conPredicate) .>.
Node [ _conFrom .<. _fromIconstraints
, _conThen .<. _thenIconstraints
, _conTo .<. _toIconstraints
]
rule1758 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1759 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
case M.lookup enumFromName (typeEnvironment _lhsIimportEnvironment) of
Just scheme -> isOverloaded scheme
Nothing -> False
rule1760 = \ ((_lhsIbetaUnique) :: Int) _overloaded ->
if _overloaded then TVar (_lhsIbetaUnique + 1) else intType
rule1761 = \ _cinfoPred _elementType _overloaded ->
if _overloaded then [predicate (Predicate "Enum" _elementType) _cinfoPred] else []
rule1762 = \ _beta _cinfoResult _elementType ->
[ (listType _elementType .==. _beta) _cinfoResult ]
rule1763 = \ _cinfoFrom _elementType ((_fromIbeta) :: Tp) ->
[ (_fromIbeta .==. _elementType) _cinfoFrom ]
rule1764 = \ _cinfoThen _elementType ((_thenIbeta) :: Tp) ->
[ (_thenIbeta .==. _elementType) _cinfoThen ]
rule1765 = \ _cinfoTo _elementType ((_toIbeta) :: Tp) ->
[ (_toIbeta .==. _elementType) _cinfoTo ]
rule1766 = \ _newDEnv ->
_newDEnv
rule1767 = \ ((_rangeIself) :: Range) ((_thenIsection) :: Bool) ((_toIsection) :: Bool) ->
flip setNameRange _rangeIself $
case (_thenIsection, _toIsection) of
(False, False) -> enumFromThenToName
(False, True ) -> enumFromThenName
(True , False) -> enumFromToName
(True , True ) -> enumFromName
rule1768 = \ _elementType ((_lhsIsubstitution) :: FixpointSubstitution) _overloaded ->
if _overloaded then _lhsIsubstitution |-> [Predicate "Enum" _elementType] else []
rule1769 = \ ((_lhsIavailablePredicates) :: Predicates) ((_lhsIclassEnvironment) :: ClassEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) _localName _requiredDictionaries ((_toIdictionaryEnvironment) :: DictionaryEnvironment) ->
resolveOverloading (_lhsIclassEnvironment) _localName
(_lhsIsubstitution |-> _lhsIavailablePredicates)
(_lhsIsubstitution |-> _requiredDictionaries)
_toIdictionaryEnvironment
rule1770 = \ _parentTree ->
childConstraint 0 "enumeration" _parentTree
[]
rule1771 = \ _parentTree ->
childConstraint 1 "enumeration" _parentTree
[]
rule1772 = \ ((_thenIinfoTrees) :: InfoTrees) ->
1 + length _thenIinfoTrees
rule1773 = \ _parentTree _toChildNr ->
childConstraint _toChildNr "enumeration" _parentTree
[]
rule1774 = \ _parentTree ->
resultConstraint "enumeration" _parentTree
[ FolkloreConstraint ]
rule1775 = \ _elementType _parentTree ->
resultConstraint "enumeration" _parentTree
[ ReductionErrorInfo (Predicate "Enum" _elementType) ]
rule1776 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1777 = \ ((_fromIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ((_thenIinfoTrees) :: InfoTrees) ((_toIinfoTrees) :: InfoTrees) ->
node _lhsIparentTree _localInfo (_fromIinfoTree : _thenIinfoTrees ++ _toIinfoTrees)
rule1778 = \ _parentTree ->
_parentTree
rule1779 = \ _assumptions _constraints ((_fromImatches) :: [Maybe MetaVariableTable]) ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ((_thenImatches) :: [Maybe MetaVariableTable]) ((_toImatches) :: [Maybe MetaVariableTable]) ((_toIuniqueSecondRound) :: Int) ->
let infoTuple = metaVarInfo _constraints _assumptions _localInfo
in match3 infoTuple _toIuniqueSecondRound
match_Expression_Enum
_lhsItryPatterns _lhsIallPatterns
[_fromImatches, _thenImatches, _toImatches]
rule1780 = \ _ioMatch ((_toImatchIO) :: IO ()) ->
_toImatchIO >> _ioMatch
rule1781 = \ ((_fromIcollectInstances) :: [(Name, Instance)]) ((_thenIcollectInstances) :: [(Name, Instance)]) ((_toIcollectInstances) :: [(Name, Instance)]) ->
_fromIcollectInstances ++ _thenIcollectInstances ++ _toIcollectInstances
rule1782 = \ ((_fromIunboundNames) :: Names) ((_thenIunboundNames) :: Names) ((_toIunboundNames) :: Names) ->
_fromIunboundNames ++ _thenIunboundNames ++ _toIunboundNames
rule1783 = \ ((_fromIself) :: Expression) ((_rangeIself) :: Range) ((_thenIself) :: MaybeExpression) ((_toIself) :: MaybeExpression) ->
Expression_Enum _rangeIself _fromIself _thenIself _toIself
rule1784 = \ _self ->
_self
rule1785 = \ _beta ->
_beta
rule1786 = \ ((_toIbetaUnique) :: Int) ->
_toIbetaUnique
rule1787 = \ ((_toIcollectErrors) :: TypeErrors) ->
_toIcollectErrors
rule1788 = \ ((_toIcollectWarnings) :: Warnings) ->
_toIcollectWarnings
rule1789 = \ ((_toIcounter) :: Int) ->
_toIcounter
rule1790 = \ ((_toIpatternMatchWarnings) :: [Warning]) ->
_toIpatternMatchWarnings
rule1791 = \ ((_toIuniqueChunk) :: Int) ->
_toIuniqueChunk
rule1792 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1793 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1794 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1795 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1796 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1797 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1798 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1799 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1800 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1801 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1802 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1803 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1804 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1805 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1806 = \ _parentTree ->
_parentTree
rule1807 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1808 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1809 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1810 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1811 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule1812 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1813 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1814 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1815 = \ ((_fromIbetaUnique) :: Int) ->
_fromIbetaUnique
rule1816 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1817 = \ ((_fromIcollectErrors) :: TypeErrors) ->
_fromIcollectErrors
rule1818 = \ ((_fromIcollectWarnings) :: Warnings) ->
_fromIcollectWarnings
rule1819 = \ ((_fromIcounter) :: Int) ->
_fromIcounter
rule1820 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1821 = \ ((_fromIdictionaryEnvironment) :: DictionaryEnvironment) ->
_fromIdictionaryEnvironment
rule1822 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1823 = \ ((_fromImatchIO) :: IO ()) ->
_fromImatchIO
rule1824 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1825 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1826 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1827 = \ _parentTree ->
_parentTree
rule1828 = \ ((_fromIpatternMatchWarnings) :: [Warning]) ->
_fromIpatternMatchWarnings
rule1829 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1830 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1831 = \ ((_fromIuniqueChunk) :: Int) ->
_fromIuniqueChunk
rule1832 = \ ((_fromIuniqueSecondRound) :: Int) ->
_fromIuniqueSecondRound
rule1833 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1834 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1835 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1836 = \ ((_thenIbetaUnique) :: Int) ->
_thenIbetaUnique
rule1837 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1838 = \ ((_thenIcollectErrors) :: TypeErrors) ->
_thenIcollectErrors
rule1839 = \ ((_thenIcollectWarnings) :: Warnings) ->
_thenIcollectWarnings
rule1840 = \ ((_thenIcounter) :: Int) ->
_thenIcounter
rule1841 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1842 = \ ((_thenIdictionaryEnvironment) :: DictionaryEnvironment) ->
_thenIdictionaryEnvironment
rule1843 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1844 = \ ((_thenImatchIO) :: IO ()) ->
_thenImatchIO
rule1845 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1846 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1847 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1848 = \ _parentTree ->
_parentTree
rule1849 = \ ((_thenIpatternMatchWarnings) :: [Warning]) ->
_thenIpatternMatchWarnings
rule1850 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1851 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1852 = \ ((_thenIuniqueChunk) :: Int) ->
_thenIuniqueChunk
rule1853 = \ ((_thenIuniqueSecondRound) :: Int) ->
_thenIuniqueSecondRound
sem_Expression_Negate :: T_Range -> T_Expression -> T_Expression
sem_Expression_Negate arg_range_ arg_expression_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_expressionObetaUnique = rule1854 _lhsIbetaUnique
_constraints = rule1855 _expressionIconstraints _newcon
_beta = rule1856 _lhsIbetaUnique
_newcon = rule1857 _beta _cinfo _expressionIbeta _lhsIimportEnvironment
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1858 _newDEnv
_localName = rule1859 _rangeIself
_negateTypeScheme = rule1860 _lhsIimportEnvironment _localName
_requiredDictionaries = rule1861 _lhsIimportEnvironment _lhsIsubstitution _negateTypeScheme _usedAsType
_usedAsType = rule1862 _beta _expressionIbeta _lhsIsubstitution
_newDEnv = rule1863 _expressionIdictionaryEnvironment _lhsIavailablePredicates _lhsIclassEnvironment _lhsIsubstitution _localName _requiredDictionaries
_cinfo = rule1864 _localInfo _parentTree _rangeIself
_localInfo = rule1865 _beta _lhsImonos _self
_parentTree = rule1866 _expressionIinfoTree _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1867 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
(_expressionOtryPatterns,_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule1868 _constraints _expressionIassumptions _expressionImatches _expressionIuniqueSecondRound _lhsIallPatterns _lhsItryPatterns _localInfo
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1869 _expressionImatchIO _ioMatch
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1870 _expressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1871 _expressionIunboundNames
_self = rule1872 _expressionIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule1873 _self
_lhsObeta :: Tp
_lhsObeta = rule1874 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1875 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1876 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1877 _expressionIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule1878 _expressionIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1879 _expressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1880 _expressionIuniqueChunk
_expressionOallPatterns = rule1881 _lhsIallPatterns
_expressionOallTypeSchemes = rule1882 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule1883 _lhsIavailablePredicates
_expressionOclassEnvironment = rule1884 _lhsIclassEnvironment
_expressionOcollectErrors = rule1885 _lhsIcollectErrors
_expressionOcollectWarnings = rule1886 _lhsIcollectWarnings
_expressionOcounter = rule1887 _lhsIcounter
_expressionOcurrentChunk = rule1888 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule1889 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule1890 _lhsIimportEnvironment
_expressionOmatchIO = rule1891 _lhsImatchIO
_expressionOmonos = rule1892 _lhsImonos
_expressionOnamesInScope = rule1893 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule1894 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule1895 _parentTree
_expressionOpatternMatchWarnings = rule1896 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule1897 _lhsIsubstitution
_expressionOtypeschemeMap = rule1898 _lhsItypeschemeMap
_expressionOuniqueChunk = rule1899 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule1900 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1854 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule1855 = \ ((_expressionIconstraints) :: ConstraintSet) _newcon ->
_newcon .>. Node [ _expressionIconstraints ]
rule1856 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1857 = \ _beta _cinfo ((_expressionIbeta) :: Tp) ((_lhsIimportEnvironment) :: ImportEnvironment) ->
let standard = makeScheme [] [Predicate "Num" (TVar 0)] (TVar 0 .->. TVar 0)
tpscheme = M.findWithDefault standard (nameFromString "negate") (typeEnvironment _lhsIimportEnvironment)
in [ (_expressionIbeta .->. _beta .::. tpscheme) _cinfo]
rule1858 = \ _newDEnv ->
_newDEnv
rule1859 = \ ((_rangeIself) :: Range) ->
setNameRange intUnaryMinusName _rangeIself
rule1860 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) _localName ->
case M.lookup _localName (typeEnvironment _lhsIimportEnvironment) of
Just scheme -> scheme
Nothing -> internalError "TypeInferenceOverloading.ag" "n/a" "type of negate unknown"
rule1861 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) _negateTypeScheme _usedAsType ->
getRequiredDictionaries
(getOrderedTypeSynonyms _lhsIimportEnvironment)
(_lhsIsubstitution |-> _usedAsType)
(_lhsIsubstitution |-> _negateTypeScheme)
rule1862 = \ _beta ((_expressionIbeta) :: Tp) ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution |-> (_expressionIbeta .->. _beta)
rule1863 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ((_lhsIavailablePredicates) :: Predicates) ((_lhsIclassEnvironment) :: ClassEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) _localName _requiredDictionaries ->
resolveOverloading (_lhsIclassEnvironment) _localName
(_lhsIsubstitution |-> _lhsIavailablePredicates)
(_lhsIsubstitution |-> _requiredDictionaries)
_expressionIdictionaryEnvironment
rule1864 = \ _localInfo _parentTree ((_rangeIself) :: Range) ->
specialConstraint "negation" _parentTree
(self _localInfo, Just $ nameToUHA_Expr (Name_Operator _rangeIself [] "-"))
[]
rule1865 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1866 = \ ((_expressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo [_expressionIinfoTree]
rule1867 = \ _parentTree ->
_parentTree
rule1868 = \ _constraints ((_expressionIassumptions) :: Assumptions) ((_expressionImatches) :: [Maybe MetaVariableTable]) ((_expressionIuniqueSecondRound) :: Int) ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _expressionIassumptions _localInfo
in match1 infoTuple _expressionIuniqueSecondRound
match_Expression_Negate
_lhsItryPatterns _lhsIallPatterns
[_expressionImatches]
rule1869 = \ ((_expressionImatchIO) :: IO ()) _ioMatch ->
_expressionImatchIO >> _ioMatch
rule1870 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule1871 = \ ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames
rule1872 = \ ((_expressionIself) :: Expression) ((_rangeIself) :: Range) ->
Expression_Negate _rangeIself _expressionIself
rule1873 = \ _self ->
_self
rule1874 = \ _beta ->
_beta
rule1875 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule1876 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule1877 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule1878 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule1879 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule1880 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule1881 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1882 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1883 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1884 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1885 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1886 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1887 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1888 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1889 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1890 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1891 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1892 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1893 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1894 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1895 = \ _parentTree ->
_parentTree
rule1896 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1897 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1898 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1899 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1900 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Expression_NegateFloat :: T_Range -> T_Expression -> T_Expression
sem_Expression_NegateFloat arg_range_ arg_expression_ = T_Expression (return st41) where
st41 = let
v40 :: T_Expression_v40
v40 = \ (T_Expression_vIn40 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_expressionObetaUnique = rule1901 _lhsIbetaUnique
_constraints = rule1902 _expressionIconstraints _newcon
_beta = rule1903 _lhsIbetaUnique
_newcon = rule1904 _beta _cinfo _expressionIbeta
_cinfo = rule1905 _localInfo _parentTree _rangeIself
_localInfo = rule1906 _beta _lhsImonos _self
_parentTree = rule1907 _expressionIinfoTree _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule1908 _parentTree
_lhsOmatches :: [Maybe MetaVariableTable]
_lhsOconstraints :: ConstraintSet
_lhsOassumptions :: Assumptions
_lhsOuniqueSecondRound :: Int
(_expressionOtryPatterns,_lhsOmatches,_lhsOconstraints,_lhsOassumptions,_lhsOuniqueSecondRound,_ioMatch) = rule1909 _constraints _expressionIassumptions _expressionImatches _expressionIuniqueSecondRound _lhsIallPatterns _lhsItryPatterns _localInfo
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1910 _expressionImatchIO _ioMatch
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1911 _expressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1912 _expressionIunboundNames
_self = rule1913 _expressionIself _rangeIself
_lhsOself :: Expression
_lhsOself = rule1914 _self
_lhsObeta :: Tp
_lhsObeta = rule1915 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1916 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1917 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1918 _expressionIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule1919 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1920 _expressionIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1921 _expressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1922 _expressionIuniqueChunk
_expressionOallPatterns = rule1923 _lhsIallPatterns
_expressionOallTypeSchemes = rule1924 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule1925 _lhsIavailablePredicates
_expressionOclassEnvironment = rule1926 _lhsIclassEnvironment
_expressionOcollectErrors = rule1927 _lhsIcollectErrors
_expressionOcollectWarnings = rule1928 _lhsIcollectWarnings
_expressionOcounter = rule1929 _lhsIcounter
_expressionOcurrentChunk = rule1930 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule1931 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule1932 _lhsIimportEnvironment
_expressionOmatchIO = rule1933 _lhsImatchIO
_expressionOmonos = rule1934 _lhsImonos
_expressionOnamesInScope = rule1935 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule1936 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule1937 _parentTree
_expressionOpatternMatchWarnings = rule1938 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule1939 _lhsIsubstitution
_expressionOtypeschemeMap = rule1940 _lhsItypeschemeMap
_expressionOuniqueChunk = rule1941 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule1942 _lhsIuniqueSecondRound
__result_ = T_Expression_vOut40 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expression_s41 v40
rule1901 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule1902 = \ ((_expressionIconstraints) :: ConstraintSet) _newcon ->
_newcon .>. Node [ _expressionIconstraints ]
rule1903 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule1904 = \ _beta _cinfo ((_expressionIbeta) :: Tp) ->
[ (floatType .->. floatType .==. _expressionIbeta .->. _beta) _cinfo]
rule1905 = \ _localInfo _parentTree ((_rangeIself) :: Range) ->
specialConstraint "negation" _parentTree
(self _localInfo, Just $ nameToUHA_Expr (Name_Operator _rangeIself [] "-."))
[]
rule1906 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Expr _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule1907 = \ ((_expressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo [_expressionIinfoTree]
rule1908 = \ _parentTree ->
_parentTree
rule1909 = \ _constraints ((_expressionIassumptions) :: Assumptions) ((_expressionImatches) :: [Maybe MetaVariableTable]) ((_expressionIuniqueSecondRound) :: Int) ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ((_lhsItryPatterns) :: [(Expression , [String])]) _localInfo ->
let infoTuple = metaVarInfo _constraints _expressionIassumptions _localInfo
in match1 infoTuple _expressionIuniqueSecondRound
match_Expression_NegateFloat
_lhsItryPatterns _lhsIallPatterns
[_expressionImatches]
rule1910 = \ ((_expressionImatchIO) :: IO ()) _ioMatch ->
_expressionImatchIO >> _ioMatch
rule1911 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule1912 = \ ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames
rule1913 = \ ((_expressionIself) :: Expression) ((_rangeIself) :: Range) ->
Expression_NegateFloat _rangeIself _expressionIself
rule1914 = \ _self ->
_self
rule1915 = \ _beta ->
_beta
rule1916 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule1917 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule1918 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule1919 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule1920 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule1921 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule1922 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule1923 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1924 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1925 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1926 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1927 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1928 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1929 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1930 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1931 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1932 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1933 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1934 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1935 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1936 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1937 = \ _parentTree ->
_parentTree
rule1938 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1939 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1940 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1941 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1942 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
data Inh_Expressions = Inh_Expressions { allPatterns_Inh_Expressions :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Expressions :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_Expressions :: (Predicates), betaUnique_Inh_Expressions :: (Int), classEnvironment_Inh_Expressions :: (ClassEnvironment), collectErrors_Inh_Expressions :: (TypeErrors), collectWarnings_Inh_Expressions :: (Warnings), counter_Inh_Expressions :: (Int), currentChunk_Inh_Expressions :: (Int), dictionaryEnvironment_Inh_Expressions :: (DictionaryEnvironment), importEnvironment_Inh_Expressions :: (ImportEnvironment), matchIO_Inh_Expressions :: (IO ()), monos_Inh_Expressions :: (Monos), namesInScope_Inh_Expressions :: (Names), orderedTypeSynonyms_Inh_Expressions :: (OrderedTypeSynonyms), parentTree_Inh_Expressions :: (InfoTree), patternMatchWarnings_Inh_Expressions :: ([Warning]), substitution_Inh_Expressions :: (FixpointSubstitution), tryPatterns_Inh_Expressions :: ([(Expressions , [String])]), typeschemeMap_Inh_Expressions :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_Expressions :: (Int), uniqueSecondRound_Inh_Expressions :: (Int) }
data Syn_Expressions = Syn_Expressions { assumptions_Syn_Expressions :: (Assumptions), betaUnique_Syn_Expressions :: (Int), betas_Syn_Expressions :: (Tps), collectErrors_Syn_Expressions :: (TypeErrors), collectInstances_Syn_Expressions :: ([(Name, Instance)]), collectWarnings_Syn_Expressions :: (Warnings), constraintslist_Syn_Expressions :: (ConstraintSets), counter_Syn_Expressions :: (Int), dictionaryEnvironment_Syn_Expressions :: (DictionaryEnvironment), infoTrees_Syn_Expressions :: (InfoTrees), matchIO_Syn_Expressions :: (IO ()), matches_Syn_Expressions :: ([Maybe MetaVariableTable]), patternMatchWarnings_Syn_Expressions :: ([Warning]), self_Syn_Expressions :: (Expressions), unboundNames_Syn_Expressions :: (Names), uniqueChunk_Syn_Expressions :: (Int), uniqueSecondRound_Syn_Expressions :: (Int) }
wrap_Expressions :: T_Expressions -> Inh_Expressions -> (Syn_Expressions )
wrap_Expressions (T_Expressions act) (Inh_Expressions _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Expressions_vIn43 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound
(T_Expressions_vOut43 _lhsOassumptions _lhsObetaUnique _lhsObetas _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound) <- return (inv_Expressions_s44 sem arg)
return (Syn_Expressions _lhsOassumptions _lhsObetaUnique _lhsObetas _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound)
)
sem_Expressions :: Expressions -> T_Expressions
sem_Expressions list = Prelude.foldr sem_Expressions_Cons sem_Expressions_Nil (Prelude.map sem_Expression list)
newtype T_Expressions = T_Expressions {
attach_T_Expressions :: Identity (T_Expressions_s44 )
}
newtype T_Expressions_s44 = C_Expressions_s44 {
inv_Expressions_s44 :: (T_Expressions_v43 )
}
data T_Expressions_s45 = C_Expressions_s45
type T_Expressions_v43 = (T_Expressions_vIn43 ) -> (T_Expressions_vOut43 )
data T_Expressions_vIn43 = T_Expressions_vIn43 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) ([(Expressions , [String])]) (M.Map Int (Scheme Predicates)) (Int) (Int)
data T_Expressions_vOut43 = T_Expressions_vOut43 (Assumptions) (Int) (Tps) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSets) (Int) (DictionaryEnvironment) (InfoTrees) (IO ()) ([Maybe MetaVariableTable]) ([Warning]) (Expressions) (Names) (Int) (Int)
sem_Expressions_Cons :: T_Expression -> T_Expressions -> T_Expressions
sem_Expressions_Cons arg_hd_ arg_tl_ = T_Expressions (return st44) where
st44 = let
v43 :: T_Expressions_v43
v43 = \ (T_Expressions_vIn43 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_hdX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_hd_))
_tlX44 = Control.Monad.Identity.runIdentity (attach_T_Expressions (arg_tl_))
(T_Expression_vOut40 _hdIassumptions _hdIbeta _hdIbetaUnique _hdIcollectErrors _hdIcollectInstances _hdIcollectWarnings _hdIconstraints _hdIcounter _hdIdictionaryEnvironment _hdIinfoTree _hdImatchIO _hdImatches _hdIpatternMatchWarnings _hdIself _hdIunboundNames _hdIuniqueChunk _hdIuniqueSecondRound) = inv_Expression_s41 _hdX41 (T_Expression_vIn40 _hdOallPatterns _hdOallTypeSchemes _hdOavailablePredicates _hdObetaUnique _hdOclassEnvironment _hdOcollectErrors _hdOcollectWarnings _hdOcounter _hdOcurrentChunk _hdOdictionaryEnvironment _hdOimportEnvironment _hdOmatchIO _hdOmonos _hdOnamesInScope _hdOorderedTypeSynonyms _hdOparentTree _hdOpatternMatchWarnings _hdOsubstitution _hdOtryPatterns _hdOtypeschemeMap _hdOuniqueChunk _hdOuniqueSecondRound)
(T_Expressions_vOut43 _tlIassumptions _tlIbetaUnique _tlIbetas _tlIcollectErrors _tlIcollectInstances _tlIcollectWarnings _tlIconstraintslist _tlIcounter _tlIdictionaryEnvironment _tlIinfoTrees _tlImatchIO _tlImatches _tlIpatternMatchWarnings _tlIself _tlIunboundNames _tlIuniqueChunk _tlIuniqueSecondRound) = inv_Expressions_s44 _tlX44 (T_Expressions_vIn43 _tlOallPatterns _tlOallTypeSchemes _tlOavailablePredicates _tlObetaUnique _tlOclassEnvironment _tlOcollectErrors _tlOcollectWarnings _tlOcounter _tlOcurrentChunk _tlOdictionaryEnvironment _tlOimportEnvironment _tlOmatchIO _tlOmonos _tlOnamesInScope _tlOorderedTypeSynonyms _tlOparentTree _tlOpatternMatchWarnings _tlOsubstitution _tlOtryPatterns _tlOtypeschemeMap _tlOuniqueChunk _tlOuniqueSecondRound)
_lhsObetas :: Tps
_lhsObetas = rule1943 _hdIbeta _tlIbetas
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule1944 _hdIassumptions _tlIassumptions
_lhsOconstraintslist :: ConstraintSets
_lhsOconstraintslist = rule1945 _hdIconstraints _tlIconstraintslist
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule1946 _hdIinfoTree _tlIinfoTrees
_lhsOmatches :: [Maybe MetaVariableTable]
((_hdOtryPatterns,_tlOtryPatterns),_lhsOmatches,_,_,_,_) = rule1947 _hdImatches _lhsItryPatterns _tlImatches
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule1948 _hdIcollectInstances _tlIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule1949 _hdIunboundNames _tlIunboundNames
_self = rule1950 _hdIself _tlIself
_lhsOself :: Expressions
_lhsOself = rule1951 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule1952 _tlIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule1953 _tlIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule1954 _tlIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule1955 _tlIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule1956 _tlIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule1957 _tlImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule1958 _tlIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule1959 _tlIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule1960 _tlIuniqueSecondRound
_hdOallPatterns = rule1961 _lhsIallPatterns
_hdOallTypeSchemes = rule1962 _lhsIallTypeSchemes
_hdOavailablePredicates = rule1963 _lhsIavailablePredicates
_hdObetaUnique = rule1964 _lhsIbetaUnique
_hdOclassEnvironment = rule1965 _lhsIclassEnvironment
_hdOcollectErrors = rule1966 _lhsIcollectErrors
_hdOcollectWarnings = rule1967 _lhsIcollectWarnings
_hdOcounter = rule1968 _lhsIcounter
_hdOcurrentChunk = rule1969 _lhsIcurrentChunk
_hdOdictionaryEnvironment = rule1970 _lhsIdictionaryEnvironment
_hdOimportEnvironment = rule1971 _lhsIimportEnvironment
_hdOmatchIO = rule1972 _lhsImatchIO
_hdOmonos = rule1973 _lhsImonos
_hdOnamesInScope = rule1974 _lhsInamesInScope
_hdOorderedTypeSynonyms = rule1975 _lhsIorderedTypeSynonyms
_hdOparentTree = rule1976 _lhsIparentTree
_hdOpatternMatchWarnings = rule1977 _lhsIpatternMatchWarnings
_hdOsubstitution = rule1978 _lhsIsubstitution
_hdOtypeschemeMap = rule1979 _lhsItypeschemeMap
_hdOuniqueChunk = rule1980 _lhsIuniqueChunk
_hdOuniqueSecondRound = rule1981 _lhsIuniqueSecondRound
_tlOallPatterns = rule1982 _lhsIallPatterns
_tlOallTypeSchemes = rule1983 _lhsIallTypeSchemes
_tlOavailablePredicates = rule1984 _lhsIavailablePredicates
_tlObetaUnique = rule1985 _hdIbetaUnique
_tlOclassEnvironment = rule1986 _lhsIclassEnvironment
_tlOcollectErrors = rule1987 _hdIcollectErrors
_tlOcollectWarnings = rule1988 _hdIcollectWarnings
_tlOcounter = rule1989 _hdIcounter
_tlOcurrentChunk = rule1990 _lhsIcurrentChunk
_tlOdictionaryEnvironment = rule1991 _hdIdictionaryEnvironment
_tlOimportEnvironment = rule1992 _lhsIimportEnvironment
_tlOmatchIO = rule1993 _hdImatchIO
_tlOmonos = rule1994 _lhsImonos
_tlOnamesInScope = rule1995 _lhsInamesInScope
_tlOorderedTypeSynonyms = rule1996 _lhsIorderedTypeSynonyms
_tlOparentTree = rule1997 _lhsIparentTree
_tlOpatternMatchWarnings = rule1998 _hdIpatternMatchWarnings
_tlOsubstitution = rule1999 _lhsIsubstitution
_tlOtypeschemeMap = rule2000 _lhsItypeschemeMap
_tlOuniqueChunk = rule2001 _hdIuniqueChunk
_tlOuniqueSecondRound = rule2002 _hdIuniqueSecondRound
__result_ = T_Expressions_vOut43 _lhsOassumptions _lhsObetaUnique _lhsObetas _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expressions_s44 v43
rule1943 = \ ((_hdIbeta) :: Tp) ((_tlIbetas) :: Tps) ->
_hdIbeta : _tlIbetas
rule1944 = \ ((_hdIassumptions) :: Assumptions) ((_tlIassumptions) :: Assumptions) ->
_hdIassumptions `combine` _tlIassumptions
rule1945 = \ ((_hdIconstraints) :: ConstraintSet) ((_tlIconstraintslist) :: ConstraintSets) ->
_hdIconstraints : _tlIconstraintslist
rule1946 = \ ((_hdIinfoTree) :: InfoTree) ((_tlIinfoTrees) :: InfoTrees) ->
_hdIinfoTree : _tlIinfoTrees
rule1947 = \ ((_hdImatches) :: [Maybe MetaVariableTable]) ((_lhsItryPatterns) :: [(Expressions , [String])]) ((_tlImatches) :: [Maybe MetaVariableTable]) ->
match2' match_Expressions_Cons _lhsItryPatterns [] [_hdImatches, _tlImatches]
rule1948 = \ ((_hdIcollectInstances) :: [(Name, Instance)]) ((_tlIcollectInstances) :: [(Name, Instance)]) ->
_hdIcollectInstances ++ _tlIcollectInstances
rule1949 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule1950 = \ ((_hdIself) :: Expression) ((_tlIself) :: Expressions) ->
(:) _hdIself _tlIself
rule1951 = \ _self ->
_self
rule1952 = \ ((_tlIbetaUnique) :: Int) ->
_tlIbetaUnique
rule1953 = \ ((_tlIcollectErrors) :: TypeErrors) ->
_tlIcollectErrors
rule1954 = \ ((_tlIcollectWarnings) :: Warnings) ->
_tlIcollectWarnings
rule1955 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule1956 = \ ((_tlIdictionaryEnvironment) :: DictionaryEnvironment) ->
_tlIdictionaryEnvironment
rule1957 = \ ((_tlImatchIO) :: IO ()) ->
_tlImatchIO
rule1958 = \ ((_tlIpatternMatchWarnings) :: [Warning]) ->
_tlIpatternMatchWarnings
rule1959 = \ ((_tlIuniqueChunk) :: Int) ->
_tlIuniqueChunk
rule1960 = \ ((_tlIuniqueSecondRound) :: Int) ->
_tlIuniqueSecondRound
rule1961 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1962 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1963 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1964 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule1965 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1966 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule1967 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule1968 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule1969 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1970 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule1971 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1972 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule1973 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1974 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1975 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1976 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule1977 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule1978 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule1979 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule1980 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule1981 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule1982 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule1983 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule1984 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule1985 = \ ((_hdIbetaUnique) :: Int) ->
_hdIbetaUnique
rule1986 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule1987 = \ ((_hdIcollectErrors) :: TypeErrors) ->
_hdIcollectErrors
rule1988 = \ ((_hdIcollectWarnings) :: Warnings) ->
_hdIcollectWarnings
rule1989 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule1990 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule1991 = \ ((_hdIdictionaryEnvironment) :: DictionaryEnvironment) ->
_hdIdictionaryEnvironment
rule1992 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule1993 = \ ((_hdImatchIO) :: IO ()) ->
_hdImatchIO
rule1994 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule1995 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule1996 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule1997 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule1998 = \ ((_hdIpatternMatchWarnings) :: [Warning]) ->
_hdIpatternMatchWarnings
rule1999 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2000 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2001 = \ ((_hdIuniqueChunk) :: Int) ->
_hdIuniqueChunk
rule2002 = \ ((_hdIuniqueSecondRound) :: Int) ->
_hdIuniqueSecondRound
sem_Expressions_Nil :: T_Expressions
sem_Expressions_Nil = T_Expressions (return st44) where
st44 = let
v43 :: T_Expressions_v43
v43 = \ (T_Expressions_vIn43 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_lhsObetas :: Tps
_lhsObetas = rule2003 ()
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2004 ()
_lhsOconstraintslist :: ConstraintSets
_lhsOconstraintslist = rule2005 ()
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2006 ()
_lhsOmatches :: [Maybe MetaVariableTable]
((),_lhsOmatches,_,_,_,_) = rule2007 _lhsItryPatterns
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2008 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2009 ()
_self = rule2010 ()
_lhsOself :: Expressions
_lhsOself = rule2011 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2012 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2013 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2014 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule2015 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2016 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2017 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2018 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2019 _lhsIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule2020 _lhsIuniqueSecondRound
__result_ = T_Expressions_vOut43 _lhsOassumptions _lhsObetaUnique _lhsObetas _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Expressions_s44 v43
rule2003 = \ (_ :: ()) ->
[]
rule2004 = \ (_ :: ()) ->
noAssumptions
rule2005 = \ (_ :: ()) ->
[]
rule2006 = \ (_ :: ()) ->
[]
rule2007 = \ ((_lhsItryPatterns) :: [(Expressions , [String])]) ->
match0' match_Expressions_Nil _lhsItryPatterns [] []
rule2008 = \ (_ :: ()) ->
[]
rule2009 = \ (_ :: ()) ->
[]
rule2010 = \ (_ :: ()) ->
[]
rule2011 = \ _self ->
_self
rule2012 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2013 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2014 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2015 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2016 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2017 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2018 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2019 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule2020 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
data Inh_FieldDeclaration = Inh_FieldDeclaration { counter_Inh_FieldDeclaration :: (Int), namesInScope_Inh_FieldDeclaration :: (Names) }
data Syn_FieldDeclaration = Syn_FieldDeclaration { counter_Syn_FieldDeclaration :: (Int), self_Syn_FieldDeclaration :: (FieldDeclaration), unboundNames_Syn_FieldDeclaration :: (Names) }
wrap_FieldDeclaration :: T_FieldDeclaration -> Inh_FieldDeclaration -> (Syn_FieldDeclaration )
wrap_FieldDeclaration (T_FieldDeclaration act) (Inh_FieldDeclaration _lhsIcounter _lhsInamesInScope) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_FieldDeclaration_vIn46 _lhsIcounter _lhsInamesInScope
(T_FieldDeclaration_vOut46 _lhsOcounter _lhsOself _lhsOunboundNames) <- return (inv_FieldDeclaration_s47 sem arg)
return (Syn_FieldDeclaration _lhsOcounter _lhsOself _lhsOunboundNames)
)
sem_FieldDeclaration :: FieldDeclaration -> T_FieldDeclaration
sem_FieldDeclaration ( FieldDeclaration_FieldDeclaration range_ names_ type_ ) = sem_FieldDeclaration_FieldDeclaration ( sem_Range range_ ) ( sem_Names names_ ) ( sem_AnnotatedType type_ )
newtype T_FieldDeclaration = T_FieldDeclaration {
attach_T_FieldDeclaration :: Identity (T_FieldDeclaration_s47 )
}
newtype T_FieldDeclaration_s47 = C_FieldDeclaration_s47 {
inv_FieldDeclaration_s47 :: (T_FieldDeclaration_v46 )
}
data T_FieldDeclaration_s48 = C_FieldDeclaration_s48
type T_FieldDeclaration_v46 = (T_FieldDeclaration_vIn46 ) -> (T_FieldDeclaration_vOut46 )
data T_FieldDeclaration_vIn46 = T_FieldDeclaration_vIn46 (Int) (Names)
data T_FieldDeclaration_vOut46 = T_FieldDeclaration_vOut46 (Int) (FieldDeclaration) (Names)
sem_FieldDeclaration_FieldDeclaration :: T_Range -> T_Names -> T_AnnotatedType -> T_FieldDeclaration
sem_FieldDeclaration_FieldDeclaration arg_range_ arg_names_ arg_type_ = T_FieldDeclaration (return st47) where
st47 = let
v46 :: T_FieldDeclaration_v46
v46 = \ (T_FieldDeclaration_vIn46 _lhsIcounter _lhsInamesInScope) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_namesX116 = Control.Monad.Identity.runIdentity (attach_T_Names (arg_names_))
_typeX8 = Control.Monad.Identity.runIdentity (attach_T_AnnotatedType (arg_type_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Names_vOut115 _namesIself) = inv_Names_s116 _namesX116 (T_Names_vIn115 )
(T_AnnotatedType_vOut7 _typeIcounter _typeIself _typeIunboundNames) = inv_AnnotatedType_s8 _typeX8 (T_AnnotatedType_vIn7 _typeOcounter _typeOnamesInScope)
(_kindErrors,_tyconEnv,_constructorenv,_importEnvironment,_valueConstructors,_allValueConstructors,_typeConstructors,_allTypeConstructors,_warnings) = rule2021 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2022 _typeIunboundNames
_self = rule2023 _namesIself _rangeIself _typeIself
_lhsOself :: FieldDeclaration
_lhsOself = rule2024 _self
_lhsOcounter :: Int
_lhsOcounter = rule2025 _typeIcounter
_typeOcounter = rule2026 _lhsIcounter
_typeOnamesInScope = rule2027 _lhsInamesInScope
__result_ = T_FieldDeclaration_vOut46 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_FieldDeclaration_s47 v46
rule2021 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "FieldDeclaration.FieldDeclaration"
rule2022 = \ ((_typeIunboundNames) :: Names) ->
_typeIunboundNames
rule2023 = \ ((_namesIself) :: Names) ((_rangeIself) :: Range) ((_typeIself) :: AnnotatedType) ->
FieldDeclaration_FieldDeclaration _rangeIself _namesIself _typeIself
rule2024 = \ _self ->
_self
rule2025 = \ ((_typeIcounter) :: Int) ->
_typeIcounter
rule2026 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2027 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
data Inh_FieldDeclarations = Inh_FieldDeclarations { counter_Inh_FieldDeclarations :: (Int), namesInScope_Inh_FieldDeclarations :: (Names) }
data Syn_FieldDeclarations = Syn_FieldDeclarations { counter_Syn_FieldDeclarations :: (Int), self_Syn_FieldDeclarations :: (FieldDeclarations), unboundNames_Syn_FieldDeclarations :: (Names) }
wrap_FieldDeclarations :: T_FieldDeclarations -> Inh_FieldDeclarations -> (Syn_FieldDeclarations )
wrap_FieldDeclarations (T_FieldDeclarations act) (Inh_FieldDeclarations _lhsIcounter _lhsInamesInScope) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_FieldDeclarations_vIn49 _lhsIcounter _lhsInamesInScope
(T_FieldDeclarations_vOut49 _lhsOcounter _lhsOself _lhsOunboundNames) <- return (inv_FieldDeclarations_s50 sem arg)
return (Syn_FieldDeclarations _lhsOcounter _lhsOself _lhsOunboundNames)
)
sem_FieldDeclarations :: FieldDeclarations -> T_FieldDeclarations
sem_FieldDeclarations list = Prelude.foldr sem_FieldDeclarations_Cons sem_FieldDeclarations_Nil (Prelude.map sem_FieldDeclaration list)
newtype T_FieldDeclarations = T_FieldDeclarations {
attach_T_FieldDeclarations :: Identity (T_FieldDeclarations_s50 )
}
newtype T_FieldDeclarations_s50 = C_FieldDeclarations_s50 {
inv_FieldDeclarations_s50 :: (T_FieldDeclarations_v49 )
}
data T_FieldDeclarations_s51 = C_FieldDeclarations_s51
type T_FieldDeclarations_v49 = (T_FieldDeclarations_vIn49 ) -> (T_FieldDeclarations_vOut49 )
data T_FieldDeclarations_vIn49 = T_FieldDeclarations_vIn49 (Int) (Names)
data T_FieldDeclarations_vOut49 = T_FieldDeclarations_vOut49 (Int) (FieldDeclarations) (Names)
sem_FieldDeclarations_Cons :: T_FieldDeclaration -> T_FieldDeclarations -> T_FieldDeclarations
sem_FieldDeclarations_Cons arg_hd_ arg_tl_ = T_FieldDeclarations (return st50) where
st50 = let
v49 :: T_FieldDeclarations_v49
v49 = \ (T_FieldDeclarations_vIn49 _lhsIcounter _lhsInamesInScope) -> ( let
_hdX47 = Control.Monad.Identity.runIdentity (attach_T_FieldDeclaration (arg_hd_))
_tlX50 = Control.Monad.Identity.runIdentity (attach_T_FieldDeclarations (arg_tl_))
(T_FieldDeclaration_vOut46 _hdIcounter _hdIself _hdIunboundNames) = inv_FieldDeclaration_s47 _hdX47 (T_FieldDeclaration_vIn46 _hdOcounter _hdOnamesInScope)
(T_FieldDeclarations_vOut49 _tlIcounter _tlIself _tlIunboundNames) = inv_FieldDeclarations_s50 _tlX50 (T_FieldDeclarations_vIn49 _tlOcounter _tlOnamesInScope)
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2028 _hdIunboundNames _tlIunboundNames
_self = rule2029 _hdIself _tlIself
_lhsOself :: FieldDeclarations
_lhsOself = rule2030 _self
_lhsOcounter :: Int
_lhsOcounter = rule2031 _tlIcounter
_hdOcounter = rule2032 _lhsIcounter
_hdOnamesInScope = rule2033 _lhsInamesInScope
_tlOcounter = rule2034 _hdIcounter
_tlOnamesInScope = rule2035 _lhsInamesInScope
__result_ = T_FieldDeclarations_vOut49 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_FieldDeclarations_s50 v49
rule2028 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule2029 = \ ((_hdIself) :: FieldDeclaration) ((_tlIself) :: FieldDeclarations) ->
(:) _hdIself _tlIself
rule2030 = \ _self ->
_self
rule2031 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule2032 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2033 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2034 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule2035 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
sem_FieldDeclarations_Nil :: T_FieldDeclarations
sem_FieldDeclarations_Nil = T_FieldDeclarations (return st50) where
st50 = let
v49 :: T_FieldDeclarations_v49
v49 = \ (T_FieldDeclarations_vIn49 _lhsIcounter _lhsInamesInScope) -> ( let
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2036 ()
_self = rule2037 ()
_lhsOself :: FieldDeclarations
_lhsOself = rule2038 _self
_lhsOcounter :: Int
_lhsOcounter = rule2039 _lhsIcounter
__result_ = T_FieldDeclarations_vOut49 _lhsOcounter _lhsOself _lhsOunboundNames
in __result_ )
in C_FieldDeclarations_s50 v49
rule2036 = \ (_ :: ()) ->
[]
rule2037 = \ (_ :: ()) ->
[]
rule2038 = \ _self ->
_self
rule2039 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
data Inh_Fixity = Inh_Fixity { }
data Syn_Fixity = Syn_Fixity { self_Syn_Fixity :: (Fixity) }
wrap_Fixity :: T_Fixity -> Inh_Fixity -> (Syn_Fixity )
wrap_Fixity (T_Fixity act) (Inh_Fixity ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Fixity_vIn52
(T_Fixity_vOut52 _lhsOself) <- return (inv_Fixity_s53 sem arg)
return (Syn_Fixity _lhsOself)
)
sem_Fixity :: Fixity -> T_Fixity
sem_Fixity ( Fixity_Infixl range_ ) = sem_Fixity_Infixl ( sem_Range range_ )
sem_Fixity ( Fixity_Infixr range_ ) = sem_Fixity_Infixr ( sem_Range range_ )
sem_Fixity ( Fixity_Infix range_ ) = sem_Fixity_Infix ( sem_Range range_ )
newtype T_Fixity = T_Fixity {
attach_T_Fixity :: Identity (T_Fixity_s53 )
}
newtype T_Fixity_s53 = C_Fixity_s53 {
inv_Fixity_s53 :: (T_Fixity_v52 )
}
data T_Fixity_s54 = C_Fixity_s54
type T_Fixity_v52 = (T_Fixity_vIn52 ) -> (T_Fixity_vOut52 )
data T_Fixity_vIn52 = T_Fixity_vIn52
data T_Fixity_vOut52 = T_Fixity_vOut52 (Fixity)
sem_Fixity_Infixl :: T_Range -> T_Fixity
sem_Fixity_Infixl arg_range_ = T_Fixity (return st53) where
st53 = let
v52 :: T_Fixity_v52
v52 = \ (T_Fixity_vIn52 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_self = rule2040 _rangeIself
_lhsOself :: Fixity
_lhsOself = rule2041 _self
__result_ = T_Fixity_vOut52 _lhsOself
in __result_ )
in C_Fixity_s53 v52
rule2040 = \ ((_rangeIself) :: Range) ->
Fixity_Infixl _rangeIself
rule2041 = \ _self ->
_self
sem_Fixity_Infixr :: T_Range -> T_Fixity
sem_Fixity_Infixr arg_range_ = T_Fixity (return st53) where
st53 = let
v52 :: T_Fixity_v52
v52 = \ (T_Fixity_vIn52 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_self = rule2042 _rangeIself
_lhsOself :: Fixity
_lhsOself = rule2043 _self
__result_ = T_Fixity_vOut52 _lhsOself
in __result_ )
in C_Fixity_s53 v52
rule2042 = \ ((_rangeIself) :: Range) ->
Fixity_Infixr _rangeIself
rule2043 = \ _self ->
_self
sem_Fixity_Infix :: T_Range -> T_Fixity
sem_Fixity_Infix arg_range_ = T_Fixity (return st53) where
st53 = let
v52 :: T_Fixity_v52
v52 = \ (T_Fixity_vIn52 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_self = rule2044 _rangeIself
_lhsOself :: Fixity
_lhsOself = rule2045 _self
__result_ = T_Fixity_vOut52 _lhsOself
in __result_ )
in C_Fixity_s53 v52
rule2044 = \ ((_rangeIself) :: Range) ->
Fixity_Infix _rangeIself
rule2045 = \ _self ->
_self
data Inh_FunctionBinding = Inh_FunctionBinding { allPatterns_Inh_FunctionBinding :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_FunctionBinding :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_FunctionBinding :: (Predicates), betaRight_Inh_FunctionBinding :: (Tp), betaUnique_Inh_FunctionBinding :: (Int), betasLeft_Inh_FunctionBinding :: (Tps), classEnvironment_Inh_FunctionBinding :: (ClassEnvironment), collectErrors_Inh_FunctionBinding :: (TypeErrors), collectWarnings_Inh_FunctionBinding :: (Warnings), counter_Inh_FunctionBinding :: (Int), currentChunk_Inh_FunctionBinding :: (Int), dictionaryEnvironment_Inh_FunctionBinding :: (DictionaryEnvironment), importEnvironment_Inh_FunctionBinding :: (ImportEnvironment), matchIO_Inh_FunctionBinding :: (IO ()), monos_Inh_FunctionBinding :: (Monos), namesInScope_Inh_FunctionBinding :: (Names), orderedTypeSynonyms_Inh_FunctionBinding :: (OrderedTypeSynonyms), parentTree_Inh_FunctionBinding :: (InfoTree), patternMatchWarnings_Inh_FunctionBinding :: ([Warning]), substitution_Inh_FunctionBinding :: (FixpointSubstitution), typeschemeMap_Inh_FunctionBinding :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_FunctionBinding :: (Int) }
data Syn_FunctionBinding = Syn_FunctionBinding { argcount_Syn_FunctionBinding :: (Int), assumptions_Syn_FunctionBinding :: (Assumptions), betaUnique_Syn_FunctionBinding :: (Int), collectErrors_Syn_FunctionBinding :: (TypeErrors), collectInstances_Syn_FunctionBinding :: ([(Name, Instance)]), collectWarnings_Syn_FunctionBinding :: (Warnings), constraints_Syn_FunctionBinding :: (ConstraintSet), counter_Syn_FunctionBinding :: (Int), dictionaryEnvironment_Syn_FunctionBinding :: (DictionaryEnvironment), elements_Syn_FunctionBinding :: ( ([PatternElement], Bool) ), infoTree_Syn_FunctionBinding :: (InfoTree), matchIO_Syn_FunctionBinding :: (IO ()), name_Syn_FunctionBinding :: (Name), numberOfPatterns_Syn_FunctionBinding :: (Int), patternMatchWarnings_Syn_FunctionBinding :: ([Warning]), self_Syn_FunctionBinding :: (FunctionBinding), unboundNames_Syn_FunctionBinding :: (Names), uniqueChunk_Syn_FunctionBinding :: (Int), unrwar_Syn_FunctionBinding :: (Warning) }
wrap_FunctionBinding :: T_FunctionBinding -> Inh_FunctionBinding -> (Syn_FunctionBinding )
wrap_FunctionBinding (T_FunctionBinding act) (Inh_FunctionBinding _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIbetasLeft _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_FunctionBinding_vIn55 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIbetasLeft _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk
(T_FunctionBinding_vOut55 _lhsOargcount _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTree _lhsOmatchIO _lhsOname _lhsOnumberOfPatterns _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar) <- return (inv_FunctionBinding_s56 sem arg)
return (Syn_FunctionBinding _lhsOargcount _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTree _lhsOmatchIO _lhsOname _lhsOnumberOfPatterns _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar)
)
sem_FunctionBinding :: FunctionBinding -> T_FunctionBinding
sem_FunctionBinding ( FunctionBinding_Hole range_ id_ ) = sem_FunctionBinding_Hole ( sem_Range range_ ) id_
sem_FunctionBinding ( FunctionBinding_Feedback range_ feedback_ functionBinding_ ) = sem_FunctionBinding_Feedback ( sem_Range range_ ) feedback_ ( sem_FunctionBinding functionBinding_ )
sem_FunctionBinding ( FunctionBinding_FunctionBinding range_ lefthandside_ righthandside_ ) = sem_FunctionBinding_FunctionBinding ( sem_Range range_ ) ( sem_LeftHandSide lefthandside_ ) ( sem_RightHandSide righthandside_ )
newtype T_FunctionBinding = T_FunctionBinding {
attach_T_FunctionBinding :: Identity (T_FunctionBinding_s56 )
}
newtype T_FunctionBinding_s56 = C_FunctionBinding_s56 {
inv_FunctionBinding_s56 :: (T_FunctionBinding_v55 )
}
data T_FunctionBinding_s57 = C_FunctionBinding_s57
type T_FunctionBinding_v55 = (T_FunctionBinding_vIn55 ) -> (T_FunctionBinding_vOut55 )
data T_FunctionBinding_vIn55 = T_FunctionBinding_vIn55 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Tp) (Int) (Tps) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Int)
data T_FunctionBinding_vOut55 = T_FunctionBinding_vOut55 (Int) (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) ( ([PatternElement], Bool) ) (InfoTree) (IO ()) (Name) (Int) ([Warning]) (FunctionBinding) (Names) (Int) (Warning)
sem_FunctionBinding_Hole :: T_Range -> (Integer) -> T_FunctionBinding
sem_FunctionBinding_Hole arg_range_ arg_id_ = T_FunctionBinding (return st56) where
st56 = let
v55 :: T_FunctionBinding_v55
v55 = \ (T_FunctionBinding_vIn55 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIbetasLeft _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_assumptions = rule2046 ()
_constraints = rule2047 ()
_numberOfPatterns = rule2048 ()
_name = rule2049 ()
_localInfo = rule2050 _lhsImonos _self
_parentTree = rule2051 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2052 _parentTree
_lhsOargcount :: Int
_lhsOargcount = rule2053 ()
_lhsOelements :: ([PatternElement], Bool)
_lhsOelements = rule2054 ()
_lhsOunrwar :: Warning
_lhsOunrwar = rule2055 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2056 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2057 ()
_self = rule2058 _rangeIself arg_id_
_lhsOself :: FunctionBinding
_lhsOself = rule2059 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2060 _assumptions
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2061 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2062 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2063 _lhsIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2064 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2065 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2066 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2067 _lhsImatchIO
_lhsOname :: Name
_lhsOname = rule2068 _name
_lhsOnumberOfPatterns :: Int
_lhsOnumberOfPatterns = rule2069 _numberOfPatterns
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2070 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2071 _lhsIuniqueChunk
__result_ = T_FunctionBinding_vOut55 _lhsOargcount _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTree _lhsOmatchIO _lhsOname _lhsOnumberOfPatterns _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar
in __result_ )
in C_FunctionBinding_s56 v55
rule2046 = \ (_ :: ()) ->
noAssumptions
rule2047 = \ (_ :: ()) ->
emptyTree
rule2048 = \ (_ :: ()) ->
0
rule2049 = \ (_ :: ()) ->
internalError "TypeInferencing.ag" "n/a" "FunctionBindings(2)"
rule2050 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_FB _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule2051 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule2052 = \ _parentTree ->
_parentTree
rule2053 = \ (_ :: ()) ->
0
rule2054 = \ (_ :: ()) ->
([], False)
rule2055 = \ (_ :: ()) ->
pmError "FunctionBinding_Hole.unrwar" "hole unrwar"
rule2056 = \ (_ :: ()) ->
[]
rule2057 = \ (_ :: ()) ->
[]
rule2058 = \ ((_rangeIself) :: Range) id_ ->
FunctionBinding_Hole _rangeIself id_
rule2059 = \ _self ->
_self
rule2060 = \ _assumptions ->
_assumptions
rule2061 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2062 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2063 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2064 = \ _constraints ->
_constraints
rule2065 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2066 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2067 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2068 = \ _name ->
_name
rule2069 = \ _numberOfPatterns ->
_numberOfPatterns
rule2070 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2071 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_FunctionBinding_Feedback :: T_Range -> (String) -> T_FunctionBinding -> T_FunctionBinding
sem_FunctionBinding_Feedback arg_range_ arg_feedback_ arg_functionBinding_ = T_FunctionBinding (return st56) where
st56 = let
v55 :: T_FunctionBinding_v55
v55 = \ (T_FunctionBinding_vIn55 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIbetasLeft _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_functionBindingX56 = Control.Monad.Identity.runIdentity (attach_T_FunctionBinding (arg_functionBinding_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_FunctionBinding_vOut55 _functionBindingIargcount _functionBindingIassumptions _functionBindingIbetaUnique _functionBindingIcollectErrors _functionBindingIcollectInstances _functionBindingIcollectWarnings _functionBindingIconstraints _functionBindingIcounter _functionBindingIdictionaryEnvironment _functionBindingIelements _functionBindingIinfoTree _functionBindingImatchIO _functionBindingIname _functionBindingInumberOfPatterns _functionBindingIpatternMatchWarnings _functionBindingIself _functionBindingIunboundNames _functionBindingIuniqueChunk _functionBindingIunrwar) = inv_FunctionBinding_s56 _functionBindingX56 (T_FunctionBinding_vIn55 _functionBindingOallPatterns _functionBindingOallTypeSchemes _functionBindingOavailablePredicates _functionBindingObetaRight _functionBindingObetaUnique _functionBindingObetasLeft _functionBindingOclassEnvironment _functionBindingOcollectErrors _functionBindingOcollectWarnings _functionBindingOcounter _functionBindingOcurrentChunk _functionBindingOdictionaryEnvironment _functionBindingOimportEnvironment _functionBindingOmatchIO _functionBindingOmonos _functionBindingOnamesInScope _functionBindingOorderedTypeSynonyms _functionBindingOparentTree _functionBindingOpatternMatchWarnings _functionBindingOsubstitution _functionBindingOtypeschemeMap _functionBindingOuniqueChunk)
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2072 _functionBindingIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2073 _functionBindingIunboundNames
_self = rule2074 _functionBindingIself _rangeIself arg_feedback_
_lhsOself :: FunctionBinding
_lhsOself = rule2075 _self
_lhsOargcount :: Int
_lhsOargcount = rule2076 _functionBindingIargcount
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2077 _functionBindingIassumptions
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2078 _functionBindingIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2079 _functionBindingIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2080 _functionBindingIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2081 _functionBindingIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule2082 _functionBindingIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2083 _functionBindingIdictionaryEnvironment
_lhsOelements :: ([PatternElement], Bool)
_lhsOelements = rule2084 _functionBindingIelements
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2085 _functionBindingIinfoTree
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2086 _functionBindingImatchIO
_lhsOname :: Name
_lhsOname = rule2087 _functionBindingIname
_lhsOnumberOfPatterns :: Int
_lhsOnumberOfPatterns = rule2088 _functionBindingInumberOfPatterns
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2089 _functionBindingIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2090 _functionBindingIuniqueChunk
_lhsOunrwar :: Warning
_lhsOunrwar = rule2091 _functionBindingIunrwar
_functionBindingOallPatterns = rule2092 _lhsIallPatterns
_functionBindingOallTypeSchemes = rule2093 _lhsIallTypeSchemes
_functionBindingOavailablePredicates = rule2094 _lhsIavailablePredicates
_functionBindingObetaRight = rule2095 _lhsIbetaRight
_functionBindingObetaUnique = rule2096 _lhsIbetaUnique
_functionBindingObetasLeft = rule2097 _lhsIbetasLeft
_functionBindingOclassEnvironment = rule2098 _lhsIclassEnvironment
_functionBindingOcollectErrors = rule2099 _lhsIcollectErrors
_functionBindingOcollectWarnings = rule2100 _lhsIcollectWarnings
_functionBindingOcounter = rule2101 _lhsIcounter
_functionBindingOcurrentChunk = rule2102 _lhsIcurrentChunk
_functionBindingOdictionaryEnvironment = rule2103 _lhsIdictionaryEnvironment
_functionBindingOimportEnvironment = rule2104 _lhsIimportEnvironment
_functionBindingOmatchIO = rule2105 _lhsImatchIO
_functionBindingOmonos = rule2106 _lhsImonos
_functionBindingOnamesInScope = rule2107 _lhsInamesInScope
_functionBindingOorderedTypeSynonyms = rule2108 _lhsIorderedTypeSynonyms
_functionBindingOparentTree = rule2109 _lhsIparentTree
_functionBindingOpatternMatchWarnings = rule2110 _lhsIpatternMatchWarnings
_functionBindingOsubstitution = rule2111 _lhsIsubstitution
_functionBindingOtypeschemeMap = rule2112 _lhsItypeschemeMap
_functionBindingOuniqueChunk = rule2113 _lhsIuniqueChunk
__result_ = T_FunctionBinding_vOut55 _lhsOargcount _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTree _lhsOmatchIO _lhsOname _lhsOnumberOfPatterns _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar
in __result_ )
in C_FunctionBinding_s56 v55
rule2072 = \ ((_functionBindingIcollectInstances) :: [(Name, Instance)]) ->
_functionBindingIcollectInstances
rule2073 = \ ((_functionBindingIunboundNames) :: Names) ->
_functionBindingIunboundNames
rule2074 = \ ((_functionBindingIself) :: FunctionBinding) ((_rangeIself) :: Range) feedback_ ->
FunctionBinding_Feedback _rangeIself feedback_ _functionBindingIself
rule2075 = \ _self ->
_self
rule2076 = \ ((_functionBindingIargcount) :: Int) ->
_functionBindingIargcount
rule2077 = \ ((_functionBindingIassumptions) :: Assumptions) ->
_functionBindingIassumptions
rule2078 = \ ((_functionBindingIbetaUnique) :: Int) ->
_functionBindingIbetaUnique
rule2079 = \ ((_functionBindingIcollectErrors) :: TypeErrors) ->
_functionBindingIcollectErrors
rule2080 = \ ((_functionBindingIcollectWarnings) :: Warnings) ->
_functionBindingIcollectWarnings
rule2081 = \ ((_functionBindingIconstraints) :: ConstraintSet) ->
_functionBindingIconstraints
rule2082 = \ ((_functionBindingIcounter) :: Int) ->
_functionBindingIcounter
rule2083 = \ ((_functionBindingIdictionaryEnvironment) :: DictionaryEnvironment) ->
_functionBindingIdictionaryEnvironment
rule2084 = \ ((_functionBindingIelements) :: ([PatternElement], Bool) ) ->
_functionBindingIelements
rule2085 = \ ((_functionBindingIinfoTree) :: InfoTree) ->
_functionBindingIinfoTree
rule2086 = \ ((_functionBindingImatchIO) :: IO ()) ->
_functionBindingImatchIO
rule2087 = \ ((_functionBindingIname) :: Name) ->
_functionBindingIname
rule2088 = \ ((_functionBindingInumberOfPatterns) :: Int) ->
_functionBindingInumberOfPatterns
rule2089 = \ ((_functionBindingIpatternMatchWarnings) :: [Warning]) ->
_functionBindingIpatternMatchWarnings
rule2090 = \ ((_functionBindingIuniqueChunk) :: Int) ->
_functionBindingIuniqueChunk
rule2091 = \ ((_functionBindingIunrwar) :: Warning) ->
_functionBindingIunrwar
rule2092 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule2093 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule2094 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule2095 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule2096 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2097 = \ ((_lhsIbetasLeft) :: Tps) ->
_lhsIbetasLeft
rule2098 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule2099 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2100 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2101 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2102 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule2103 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2104 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2105 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2106 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2107 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2108 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule2109 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2110 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2111 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2112 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2113 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_FunctionBinding_FunctionBinding :: T_Range -> T_LeftHandSide -> T_RightHandSide -> T_FunctionBinding
sem_FunctionBinding_FunctionBinding arg_range_ arg_lefthandside_ arg_righthandside_ = T_FunctionBinding (return st56) where
st56 = let
v55 :: T_FunctionBinding_v55
v55 = \ (T_FunctionBinding_vIn55 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIbetasLeft _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_lefthandsideX83 = Control.Monad.Identity.runIdentity (attach_T_LeftHandSide (arg_lefthandside_))
_righthandsideX149 = Control.Monad.Identity.runIdentity (attach_T_RightHandSide (arg_righthandside_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_LeftHandSide_vOut82 _lefthandsideIargcount _lefthandsideIbetaUnique _lefthandsideIbetas _lefthandsideIconstraints _lefthandsideIcounter _lefthandsideIelements _lefthandsideIenvironment _lefthandsideIinfoTrees _lefthandsideIname _lefthandsideInumberOfPatterns _lefthandsideIpatVarNames _lefthandsideIpatternMatchWarnings _lefthandsideIself _lefthandsideIunboundNames) = inv_LeftHandSide_s83 _lefthandsideX83 (T_LeftHandSide_vIn82 _lefthandsideObetaUnique _lefthandsideOcounter _lefthandsideOimportEnvironment _lefthandsideOmonos _lefthandsideOnamesInScope _lefthandsideOparentTree _lefthandsideOpatternMatchWarnings)
(T_RightHandSide_vOut148 _righthandsideIassumptions _righthandsideIbetaUnique _righthandsideIcollectErrors _righthandsideIcollectInstances _righthandsideIcollectWarnings _righthandsideIconstraints _righthandsideIcounter _righthandsideIdictionaryEnvironment _righthandsideIfallthrough _righthandsideIinfoTree _righthandsideImatchIO _righthandsideIpatternMatchWarnings _righthandsideIself _righthandsideIunboundNames _righthandsideIuniqueChunk) = inv_RightHandSide_s149 _righthandsideX149 (T_RightHandSide_vIn148 _righthandsideOallPatterns _righthandsideOallTypeSchemes _righthandsideOavailablePredicates _righthandsideObetaRight _righthandsideObetaUnique _righthandsideOclassEnvironment _righthandsideOcollectErrors _righthandsideOcollectWarnings _righthandsideOcounter _righthandsideOcurrentChunk _righthandsideOdictionaryEnvironment _righthandsideOimportEnvironment _righthandsideOmatchIO _righthandsideOmonos _righthandsideOnamesInScope _righthandsideOorderedTypeSynonyms _righthandsideOparentTree _righthandsideOpatternMatchWarnings _righthandsideOsubstitution _righthandsideOtypeschemeMap _righthandsideOuniqueChunk)
_righthandsideOmonos = rule2114 _csetBinds _lefthandsideIenvironment _lhsImonos
_constraints = rule2115 _conLeft _csetBinds _lefthandsideIconstraints _righthandsideIconstraints
_conLeft = rule2116 _cinfoLeft _lefthandsideIbetas _lhsIbetasLeft
_lhsOassumptions :: Assumptions
(_csetBinds,_lhsOassumptions) = rule2117 _cinfoBind _lefthandsideIenvironment _righthandsideIassumptions
_cinfoLeft = rule2118 _lhsIbetasLeft _lhsIparentTree _parentTree
_cinfoBind = rule2119 _lefthandsideIenvironment _parentTree
_localInfo = rule2120 _lhsImonos _self
_parentTree = rule2121 _lefthandsideIinfoTrees _lhsIparentTree _localInfo _righthandsideIinfoTree
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2122 _parentTree
(_namesInScope,_unboundNames,_scopeInfo) = rule2123 _lefthandsideIpatVarNames _lhsInamesInScope _righthandsideIunboundNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2124 _unboundNames
_lhsOunrwar :: Warning
_lhsOunrwar = rule2125 _lefthandsideIself
_lhsOelements :: ([PatternElement], Bool)
_lhsOelements = rule2126 _lefthandsideIelements _righthandsideIfallthrough
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2127 _righthandsideIcollectInstances
_self = rule2128 _lefthandsideIself _rangeIself _righthandsideIself
_lhsOself :: FunctionBinding
_lhsOself = rule2129 _self
_lhsOargcount :: Int
_lhsOargcount = rule2130 _lefthandsideIargcount
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2131 _righthandsideIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2132 _righthandsideIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2133 _righthandsideIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2134 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2135 _righthandsideIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2136 _righthandsideIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2137 _righthandsideImatchIO
_lhsOname :: Name
_lhsOname = rule2138 _lefthandsideIname
_lhsOnumberOfPatterns :: Int
_lhsOnumberOfPatterns = rule2139 _lefthandsideInumberOfPatterns
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2140 _righthandsideIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2141 _righthandsideIuniqueChunk
_lefthandsideObetaUnique = rule2142 _lhsIbetaUnique
_lefthandsideOcounter = rule2143 _lhsIcounter
_lefthandsideOimportEnvironment = rule2144 _lhsIimportEnvironment
_lefthandsideOmonos = rule2145 _lhsImonos
_lefthandsideOnamesInScope = rule2146 _namesInScope
_lefthandsideOparentTree = rule2147 _parentTree
_lefthandsideOpatternMatchWarnings = rule2148 _lhsIpatternMatchWarnings
_righthandsideOallPatterns = rule2149 _lhsIallPatterns
_righthandsideOallTypeSchemes = rule2150 _lhsIallTypeSchemes
_righthandsideOavailablePredicates = rule2151 _lhsIavailablePredicates
_righthandsideObetaRight = rule2152 _lhsIbetaRight
_righthandsideObetaUnique = rule2153 _lefthandsideIbetaUnique
_righthandsideOclassEnvironment = rule2154 _lhsIclassEnvironment
_righthandsideOcollectErrors = rule2155 _lhsIcollectErrors
_righthandsideOcollectWarnings = rule2156 _lhsIcollectWarnings
_righthandsideOcounter = rule2157 _lefthandsideIcounter
_righthandsideOcurrentChunk = rule2158 _lhsIcurrentChunk
_righthandsideOdictionaryEnvironment = rule2159 _lhsIdictionaryEnvironment
_righthandsideOimportEnvironment = rule2160 _lhsIimportEnvironment
_righthandsideOmatchIO = rule2161 _lhsImatchIO
_righthandsideOnamesInScope = rule2162 _namesInScope
_righthandsideOorderedTypeSynonyms = rule2163 _lhsIorderedTypeSynonyms
_righthandsideOparentTree = rule2164 _parentTree
_righthandsideOpatternMatchWarnings = rule2165 _lefthandsideIpatternMatchWarnings
_righthandsideOsubstitution = rule2166 _lhsIsubstitution
_righthandsideOtypeschemeMap = rule2167 _lhsItypeschemeMap
_righthandsideOuniqueChunk = rule2168 _lhsIuniqueChunk
__result_ = T_FunctionBinding_vOut55 _lhsOargcount _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOelements _lhsOinfoTree _lhsOmatchIO _lhsOname _lhsOnumberOfPatterns _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwar
in __result_ )
in C_FunctionBinding_s56 v55
rule2114 = \ _csetBinds ((_lefthandsideIenvironment) :: PatternAssumptions) ((_lhsImonos) :: Monos) ->
M.elems _lefthandsideIenvironment ++ getMonos _csetBinds ++ _lhsImonos
rule2115 = \ _conLeft _csetBinds ((_lefthandsideIconstraints) :: ConstraintSet) ((_righthandsideIconstraints) :: ConstraintSet) ->
_csetBinds .>>.
Node [ _conLeft .<. _lefthandsideIconstraints
, _righthandsideIconstraints
]
rule2116 = \ _cinfoLeft ((_lefthandsideIbetas) :: Tps) ((_lhsIbetasLeft) :: Tps) ->
zipWith3 (\t1 t2 nr -> (t1 .==. t2) (_cinfoLeft nr)) _lefthandsideIbetas _lhsIbetasLeft [0..]
rule2117 = \ _cinfoBind ((_lefthandsideIenvironment) :: PatternAssumptions) ((_righthandsideIassumptions) :: Assumptions) ->
(_lefthandsideIenvironment .===. _righthandsideIassumptions) _cinfoBind
rule2118 = \ ((_lhsIbetasLeft) :: Tps) ((_lhsIparentTree) :: InfoTree) _parentTree ->
\num ->
orphanConstraint num "pattern of function binding" _parentTree
[ Unifier (head (ftv (_lhsIbetasLeft !! num))) (ordinal True (num+1)++" pattern of function bindings", attribute _lhsIparentTree, "pattern") ]
rule2119 = \ ((_lefthandsideIenvironment) :: PatternAssumptions) _parentTree ->
\name -> variableConstraint "variable" (nameToUHA_Expr name)
[ FolkloreConstraint
, makeUnifier name "function binding" _lefthandsideIenvironment _parentTree
]
rule2120 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_FB _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule2121 = \ ((_lefthandsideIinfoTrees) :: InfoTrees) ((_lhsIparentTree) :: InfoTree) _localInfo ((_righthandsideIinfoTree) :: InfoTree) ->
node _lhsIparentTree _localInfo (_lefthandsideIinfoTrees ++ [_righthandsideIinfoTree])
rule2122 = \ _parentTree ->
_parentTree
rule2123 = \ ((_lefthandsideIpatVarNames) :: Names) ((_lhsInamesInScope) :: Names) ((_righthandsideIunboundNames) :: Names) ->
changeOfScope _lefthandsideIpatVarNames _righthandsideIunboundNames _lhsInamesInScope
rule2124 = \ _unboundNames ->
_unboundNames
rule2125 = \ ((_lefthandsideIself) :: LeftHandSide) ->
UnreachablePatternLHS _lefthandsideIself
rule2126 = \ ((_lefthandsideIelements) :: [PatternElement] ) ((_righthandsideIfallthrough) :: Bool) ->
(_lefthandsideIelements, _righthandsideIfallthrough)
rule2127 = \ ((_righthandsideIcollectInstances) :: [(Name, Instance)]) ->
_righthandsideIcollectInstances
rule2128 = \ ((_lefthandsideIself) :: LeftHandSide) ((_rangeIself) :: Range) ((_righthandsideIself) :: RightHandSide) ->
FunctionBinding_FunctionBinding _rangeIself _lefthandsideIself _righthandsideIself
rule2129 = \ _self ->
_self
rule2130 = \ ((_lefthandsideIargcount) :: Int) ->
_lefthandsideIargcount
rule2131 = \ ((_righthandsideIbetaUnique) :: Int) ->
_righthandsideIbetaUnique
rule2132 = \ ((_righthandsideIcollectErrors) :: TypeErrors) ->
_righthandsideIcollectErrors
rule2133 = \ ((_righthandsideIcollectWarnings) :: Warnings) ->
_righthandsideIcollectWarnings
rule2134 = \ _constraints ->
_constraints
rule2135 = \ ((_righthandsideIcounter) :: Int) ->
_righthandsideIcounter
rule2136 = \ ((_righthandsideIdictionaryEnvironment) :: DictionaryEnvironment) ->
_righthandsideIdictionaryEnvironment
rule2137 = \ ((_righthandsideImatchIO) :: IO ()) ->
_righthandsideImatchIO
rule2138 = \ ((_lefthandsideIname) :: Name) ->
_lefthandsideIname
rule2139 = \ ((_lefthandsideInumberOfPatterns) :: Int) ->
_lefthandsideInumberOfPatterns
rule2140 = \ ((_righthandsideIpatternMatchWarnings) :: [Warning]) ->
_righthandsideIpatternMatchWarnings
rule2141 = \ ((_righthandsideIuniqueChunk) :: Int) ->
_righthandsideIuniqueChunk
rule2142 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2143 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2144 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2145 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2146 = \ _namesInScope ->
_namesInScope
rule2147 = \ _parentTree ->
_parentTree
rule2148 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2149 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule2150 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule2151 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule2152 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule2153 = \ ((_lefthandsideIbetaUnique) :: Int) ->
_lefthandsideIbetaUnique
rule2154 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule2155 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2156 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2157 = \ ((_lefthandsideIcounter) :: Int) ->
_lefthandsideIcounter
rule2158 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule2159 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2160 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2161 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2162 = \ _namesInScope ->
_namesInScope
rule2163 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule2164 = \ _parentTree ->
_parentTree
rule2165 = \ ((_lefthandsideIpatternMatchWarnings) :: [Warning]) ->
_lefthandsideIpatternMatchWarnings
rule2166 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2167 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2168 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
data Inh_FunctionBindings = Inh_FunctionBindings { allPatterns_Inh_FunctionBindings :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_FunctionBindings :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_FunctionBindings :: (Predicates), betaRight_Inh_FunctionBindings :: (Tp), betaUnique_Inh_FunctionBindings :: (Int), betasLeft_Inh_FunctionBindings :: (Tps), classEnvironment_Inh_FunctionBindings :: (ClassEnvironment), collectErrors_Inh_FunctionBindings :: (TypeErrors), collectWarnings_Inh_FunctionBindings :: (Warnings), counter_Inh_FunctionBindings :: (Int), currentChunk_Inh_FunctionBindings :: (Int), dictionaryEnvironment_Inh_FunctionBindings :: (DictionaryEnvironment), importEnvironment_Inh_FunctionBindings :: (ImportEnvironment), matchIO_Inh_FunctionBindings :: (IO ()), monos_Inh_FunctionBindings :: (Monos), namesInScope_Inh_FunctionBindings :: (Names), orderedTypeSynonyms_Inh_FunctionBindings :: (OrderedTypeSynonyms), parentTree_Inh_FunctionBindings :: (InfoTree), patternMatchWarnings_Inh_FunctionBindings :: ([Warning]), substitution_Inh_FunctionBindings :: (FixpointSubstitution), typeschemeMap_Inh_FunctionBindings :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_FunctionBindings :: (Int) }
data Syn_FunctionBindings = Syn_FunctionBindings { argcount_Syn_FunctionBindings :: (Int), assumptions_Syn_FunctionBindings :: (Assumptions), betaUnique_Syn_FunctionBindings :: (Int), collectErrors_Syn_FunctionBindings :: (TypeErrors), collectInstances_Syn_FunctionBindings :: ([(Name, Instance)]), collectWarnings_Syn_FunctionBindings :: (Warnings), constraintslist_Syn_FunctionBindings :: (ConstraintSets), counter_Syn_FunctionBindings :: (Int), dictionaryEnvironment_Syn_FunctionBindings :: (DictionaryEnvironment), elementss_Syn_FunctionBindings :: ([([PatternElement], Bool)]), infoTrees_Syn_FunctionBindings :: (InfoTrees), matchIO_Syn_FunctionBindings :: (IO ()), name_Syn_FunctionBindings :: (Name), numberOfPatterns_Syn_FunctionBindings :: (Int), patternMatchWarnings_Syn_FunctionBindings :: ([Warning]), self_Syn_FunctionBindings :: (FunctionBindings), unboundNames_Syn_FunctionBindings :: (Names), uniqueChunk_Syn_FunctionBindings :: (Int), unrwars_Syn_FunctionBindings :: ([Warning]) }
wrap_FunctionBindings :: T_FunctionBindings -> Inh_FunctionBindings -> (Syn_FunctionBindings )
wrap_FunctionBindings (T_FunctionBindings act) (Inh_FunctionBindings _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIbetasLeft _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_FunctionBindings_vIn58 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIbetasLeft _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk
(T_FunctionBindings_vOut58 _lhsOargcount _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOelementss _lhsOinfoTrees _lhsOmatchIO _lhsOname _lhsOnumberOfPatterns _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwars) <- return (inv_FunctionBindings_s59 sem arg)
return (Syn_FunctionBindings _lhsOargcount _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOelementss _lhsOinfoTrees _lhsOmatchIO _lhsOname _lhsOnumberOfPatterns _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwars)
)
sem_FunctionBindings :: FunctionBindings -> T_FunctionBindings
sem_FunctionBindings list = Prelude.foldr sem_FunctionBindings_Cons sem_FunctionBindings_Nil (Prelude.map sem_FunctionBinding list)
newtype T_FunctionBindings = T_FunctionBindings {
attach_T_FunctionBindings :: Identity (T_FunctionBindings_s59 )
}
newtype T_FunctionBindings_s59 = C_FunctionBindings_s59 {
inv_FunctionBindings_s59 :: (T_FunctionBindings_v58 )
}
data T_FunctionBindings_s60 = C_FunctionBindings_s60
type T_FunctionBindings_v58 = (T_FunctionBindings_vIn58 ) -> (T_FunctionBindings_vOut58 )
data T_FunctionBindings_vIn58 = T_FunctionBindings_vIn58 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Tp) (Int) (Tps) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Int)
data T_FunctionBindings_vOut58 = T_FunctionBindings_vOut58 (Int) (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSets) (Int) (DictionaryEnvironment) ([([PatternElement], Bool)]) (InfoTrees) (IO ()) (Name) (Int) ([Warning]) (FunctionBindings) (Names) (Int) ([Warning])
sem_FunctionBindings_Cons :: T_FunctionBinding -> T_FunctionBindings -> T_FunctionBindings
sem_FunctionBindings_Cons arg_hd_ arg_tl_ = T_FunctionBindings (return st59) where
st59 = let
v58 :: T_FunctionBindings_v58
v58 = \ (T_FunctionBindings_vIn58 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIbetasLeft _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_hdX56 = Control.Monad.Identity.runIdentity (attach_T_FunctionBinding (arg_hd_))
_tlX59 = Control.Monad.Identity.runIdentity (attach_T_FunctionBindings (arg_tl_))
(T_FunctionBinding_vOut55 _hdIargcount _hdIassumptions _hdIbetaUnique _hdIcollectErrors _hdIcollectInstances _hdIcollectWarnings _hdIconstraints _hdIcounter _hdIdictionaryEnvironment _hdIelements _hdIinfoTree _hdImatchIO _hdIname _hdInumberOfPatterns _hdIpatternMatchWarnings _hdIself _hdIunboundNames _hdIuniqueChunk _hdIunrwar) = inv_FunctionBinding_s56 _hdX56 (T_FunctionBinding_vIn55 _hdOallPatterns _hdOallTypeSchemes _hdOavailablePredicates _hdObetaRight _hdObetaUnique _hdObetasLeft _hdOclassEnvironment _hdOcollectErrors _hdOcollectWarnings _hdOcounter _hdOcurrentChunk _hdOdictionaryEnvironment _hdOimportEnvironment _hdOmatchIO _hdOmonos _hdOnamesInScope _hdOorderedTypeSynonyms _hdOparentTree _hdOpatternMatchWarnings _hdOsubstitution _hdOtypeschemeMap _hdOuniqueChunk)
(T_FunctionBindings_vOut58 _tlIargcount _tlIassumptions _tlIbetaUnique _tlIcollectErrors _tlIcollectInstances _tlIcollectWarnings _tlIconstraintslist _tlIcounter _tlIdictionaryEnvironment _tlIelementss _tlIinfoTrees _tlImatchIO _tlIname _tlInumberOfPatterns _tlIpatternMatchWarnings _tlIself _tlIunboundNames _tlIuniqueChunk _tlIunrwars) = inv_FunctionBindings_s59 _tlX59 (T_FunctionBindings_vIn58 _tlOallPatterns _tlOallTypeSchemes _tlOavailablePredicates _tlObetaRight _tlObetaUnique _tlObetasLeft _tlOclassEnvironment _tlOcollectErrors _tlOcollectWarnings _tlOcounter _tlOcurrentChunk _tlOdictionaryEnvironment _tlOimportEnvironment _tlOmatchIO _tlOmonos _tlOnamesInScope _tlOorderedTypeSynonyms _tlOparentTree _tlOpatternMatchWarnings _tlOsubstitution _tlOtypeschemeMap _tlOuniqueChunk)
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2169 _hdIassumptions _tlIassumptions
_lhsOnumberOfPatterns :: Int
_lhsOnumberOfPatterns = rule2170 _hdInumberOfPatterns
_lhsOname :: Name
_lhsOname = rule2171 _hdIname
_lhsOconstraintslist :: ConstraintSets
_lhsOconstraintslist = rule2172 _hdIconstraints _tlIconstraintslist
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2173 _hdIinfoTree _tlIinfoTrees
_lhsOelementss :: [([PatternElement], Bool)]
_lhsOelementss = rule2174 _hdIelements _tlIelementss
_lhsOunrwars :: [Warning]
_lhsOunrwars = rule2175 _hdIunrwar _tlIunrwars
_lhsOargcount :: Int
_lhsOargcount = rule2176 _hdIargcount
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2177 _hdIcollectInstances _tlIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2178 _hdIunboundNames _tlIunboundNames
_self = rule2179 _hdIself _tlIself
_lhsOself :: FunctionBindings
_lhsOself = rule2180 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2181 _tlIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2182 _tlIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2183 _tlIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule2184 _tlIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2185 _tlIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2186 _tlImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2187 _tlIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2188 _tlIuniqueChunk
_hdOallPatterns = rule2189 _lhsIallPatterns
_hdOallTypeSchemes = rule2190 _lhsIallTypeSchemes
_hdOavailablePredicates = rule2191 _lhsIavailablePredicates
_hdObetaRight = rule2192 _lhsIbetaRight
_hdObetaUnique = rule2193 _lhsIbetaUnique
_hdObetasLeft = rule2194 _lhsIbetasLeft
_hdOclassEnvironment = rule2195 _lhsIclassEnvironment
_hdOcollectErrors = rule2196 _lhsIcollectErrors
_hdOcollectWarnings = rule2197 _lhsIcollectWarnings
_hdOcounter = rule2198 _lhsIcounter
_hdOcurrentChunk = rule2199 _lhsIcurrentChunk
_hdOdictionaryEnvironment = rule2200 _lhsIdictionaryEnvironment
_hdOimportEnvironment = rule2201 _lhsIimportEnvironment
_hdOmatchIO = rule2202 _lhsImatchIO
_hdOmonos = rule2203 _lhsImonos
_hdOnamesInScope = rule2204 _lhsInamesInScope
_hdOorderedTypeSynonyms = rule2205 _lhsIorderedTypeSynonyms
_hdOparentTree = rule2206 _lhsIparentTree
_hdOpatternMatchWarnings = rule2207 _lhsIpatternMatchWarnings
_hdOsubstitution = rule2208 _lhsIsubstitution
_hdOtypeschemeMap = rule2209 _lhsItypeschemeMap
_hdOuniqueChunk = rule2210 _lhsIuniqueChunk
_tlOallPatterns = rule2211 _lhsIallPatterns
_tlOallTypeSchemes = rule2212 _lhsIallTypeSchemes
_tlOavailablePredicates = rule2213 _lhsIavailablePredicates
_tlObetaRight = rule2214 _lhsIbetaRight
_tlObetaUnique = rule2215 _hdIbetaUnique
_tlObetasLeft = rule2216 _lhsIbetasLeft
_tlOclassEnvironment = rule2217 _lhsIclassEnvironment
_tlOcollectErrors = rule2218 _hdIcollectErrors
_tlOcollectWarnings = rule2219 _hdIcollectWarnings
_tlOcounter = rule2220 _hdIcounter
_tlOcurrentChunk = rule2221 _lhsIcurrentChunk
_tlOdictionaryEnvironment = rule2222 _hdIdictionaryEnvironment
_tlOimportEnvironment = rule2223 _lhsIimportEnvironment
_tlOmatchIO = rule2224 _hdImatchIO
_tlOmonos = rule2225 _lhsImonos
_tlOnamesInScope = rule2226 _lhsInamesInScope
_tlOorderedTypeSynonyms = rule2227 _lhsIorderedTypeSynonyms
_tlOparentTree = rule2228 _lhsIparentTree
_tlOpatternMatchWarnings = rule2229 _hdIpatternMatchWarnings
_tlOsubstitution = rule2230 _lhsIsubstitution
_tlOtypeschemeMap = rule2231 _lhsItypeschemeMap
_tlOuniqueChunk = rule2232 _hdIuniqueChunk
__result_ = T_FunctionBindings_vOut58 _lhsOargcount _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOelementss _lhsOinfoTrees _lhsOmatchIO _lhsOname _lhsOnumberOfPatterns _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwars
in __result_ )
in C_FunctionBindings_s59 v58
rule2169 = \ ((_hdIassumptions) :: Assumptions) ((_tlIassumptions) :: Assumptions) ->
_hdIassumptions `combine` _tlIassumptions
rule2170 = \ ((_hdInumberOfPatterns) :: Int) ->
_hdInumberOfPatterns
rule2171 = \ ((_hdIname) :: Name) ->
_hdIname
rule2172 = \ ((_hdIconstraints) :: ConstraintSet) ((_tlIconstraintslist) :: ConstraintSets) ->
_hdIconstraints : _tlIconstraintslist
rule2173 = \ ((_hdIinfoTree) :: InfoTree) ((_tlIinfoTrees) :: InfoTrees) ->
_hdIinfoTree : _tlIinfoTrees
rule2174 = \ ((_hdIelements) :: ([PatternElement], Bool) ) ((_tlIelementss) :: [([PatternElement], Bool)]) ->
_hdIelements : _tlIelementss
rule2175 = \ ((_hdIunrwar) :: Warning) ((_tlIunrwars) :: [Warning]) ->
_hdIunrwar : _tlIunrwars
rule2176 = \ ((_hdIargcount) :: Int) ->
_hdIargcount
rule2177 = \ ((_hdIcollectInstances) :: [(Name, Instance)]) ((_tlIcollectInstances) :: [(Name, Instance)]) ->
_hdIcollectInstances ++ _tlIcollectInstances
rule2178 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule2179 = \ ((_hdIself) :: FunctionBinding) ((_tlIself) :: FunctionBindings) ->
(:) _hdIself _tlIself
rule2180 = \ _self ->
_self
rule2181 = \ ((_tlIbetaUnique) :: Int) ->
_tlIbetaUnique
rule2182 = \ ((_tlIcollectErrors) :: TypeErrors) ->
_tlIcollectErrors
rule2183 = \ ((_tlIcollectWarnings) :: Warnings) ->
_tlIcollectWarnings
rule2184 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule2185 = \ ((_tlIdictionaryEnvironment) :: DictionaryEnvironment) ->
_tlIdictionaryEnvironment
rule2186 = \ ((_tlImatchIO) :: IO ()) ->
_tlImatchIO
rule2187 = \ ((_tlIpatternMatchWarnings) :: [Warning]) ->
_tlIpatternMatchWarnings
rule2188 = \ ((_tlIuniqueChunk) :: Int) ->
_tlIuniqueChunk
rule2189 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule2190 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule2191 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule2192 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule2193 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2194 = \ ((_lhsIbetasLeft) :: Tps) ->
_lhsIbetasLeft
rule2195 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule2196 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2197 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2198 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2199 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule2200 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2201 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2202 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2203 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2204 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2205 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule2206 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2207 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2208 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2209 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2210 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule2211 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule2212 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule2213 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule2214 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule2215 = \ ((_hdIbetaUnique) :: Int) ->
_hdIbetaUnique
rule2216 = \ ((_lhsIbetasLeft) :: Tps) ->
_lhsIbetasLeft
rule2217 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule2218 = \ ((_hdIcollectErrors) :: TypeErrors) ->
_hdIcollectErrors
rule2219 = \ ((_hdIcollectWarnings) :: Warnings) ->
_hdIcollectWarnings
rule2220 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule2221 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule2222 = \ ((_hdIdictionaryEnvironment) :: DictionaryEnvironment) ->
_hdIdictionaryEnvironment
rule2223 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2224 = \ ((_hdImatchIO) :: IO ()) ->
_hdImatchIO
rule2225 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2226 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2227 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule2228 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2229 = \ ((_hdIpatternMatchWarnings) :: [Warning]) ->
_hdIpatternMatchWarnings
rule2230 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2231 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2232 = \ ((_hdIuniqueChunk) :: Int) ->
_hdIuniqueChunk
sem_FunctionBindings_Nil :: T_FunctionBindings
sem_FunctionBindings_Nil = T_FunctionBindings (return st59) where
st59 = let
v58 :: T_FunctionBindings_v58
v58 = \ (T_FunctionBindings_vIn58 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIbetasLeft _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2233 ()
_lhsOnumberOfPatterns :: Int
_lhsOnumberOfPatterns = rule2234 ()
_lhsOname :: Name
_lhsOname = rule2235 ()
_lhsOconstraintslist :: ConstraintSets
_lhsOconstraintslist = rule2236 ()
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2237 ()
_lhsOelementss :: [([PatternElement], Bool)]
_lhsOelementss = rule2238 ()
_lhsOunrwars :: [Warning]
_lhsOunrwars = rule2239 ()
_lhsOargcount :: Int
_lhsOargcount = rule2240 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2241 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2242 ()
_self = rule2243 ()
_lhsOself :: FunctionBindings
_lhsOself = rule2244 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2245 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2246 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2247 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule2248 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2249 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2250 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2251 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2252 _lhsIuniqueChunk
__result_ = T_FunctionBindings_vOut58 _lhsOargcount _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOelementss _lhsOinfoTrees _lhsOmatchIO _lhsOname _lhsOnumberOfPatterns _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOunrwars
in __result_ )
in C_FunctionBindings_s59 v58
rule2233 = \ (_ :: ()) ->
noAssumptions
rule2234 = \ (_ :: ()) ->
internalError "TypeInferencing.ag" "n/a" "FunctionBindings(1)"
rule2235 = \ (_ :: ()) ->
internalError "TypeInferencing.ag" "n/a" "FunctionBindings(2)"
rule2236 = \ (_ :: ()) ->
[]
rule2237 = \ (_ :: ()) ->
[]
rule2238 = \ (_ :: ()) ->
[]
rule2239 = \ (_ :: ()) ->
[]
rule2240 = \ (_ :: ()) ->
pmError "FunctionBindings_Nil.argcount" "?empty list of function bindings?"
rule2241 = \ (_ :: ()) ->
[]
rule2242 = \ (_ :: ()) ->
[]
rule2243 = \ (_ :: ()) ->
[]
rule2244 = \ _self ->
_self
rule2245 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2246 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2247 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2248 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2249 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2250 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2251 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2252 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
data Inh_GuardedExpression = Inh_GuardedExpression { allPatterns_Inh_GuardedExpression :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_GuardedExpression :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_GuardedExpression :: (Predicates), betaRight_Inh_GuardedExpression :: (Tp), betaUnique_Inh_GuardedExpression :: (Int), classEnvironment_Inh_GuardedExpression :: (ClassEnvironment), collectErrors_Inh_GuardedExpression :: (TypeErrors), collectWarnings_Inh_GuardedExpression :: (Warnings), counter_Inh_GuardedExpression :: (Int), currentChunk_Inh_GuardedExpression :: (Int), dictionaryEnvironment_Inh_GuardedExpression :: (DictionaryEnvironment), importEnvironment_Inh_GuardedExpression :: (ImportEnvironment), matchIO_Inh_GuardedExpression :: (IO ()), monos_Inh_GuardedExpression :: (Monos), namesInScope_Inh_GuardedExpression :: (Names), numberOfGuards_Inh_GuardedExpression :: (Int), orderedTypeSynonyms_Inh_GuardedExpression :: (OrderedTypeSynonyms), parentTree_Inh_GuardedExpression :: (InfoTree), patternMatchWarnings_Inh_GuardedExpression :: ([Warning]), substitution_Inh_GuardedExpression :: (FixpointSubstitution), typeschemeMap_Inh_GuardedExpression :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_GuardedExpression :: (Int), uniqueSecondRound_Inh_GuardedExpression :: (Int) }
data Syn_GuardedExpression = Syn_GuardedExpression { assumptions_Syn_GuardedExpression :: (Assumptions), betaUnique_Syn_GuardedExpression :: (Int), collectErrors_Syn_GuardedExpression :: (TypeErrors), collectInstances_Syn_GuardedExpression :: ([(Name, Instance)]), collectWarnings_Syn_GuardedExpression :: (Warnings), constraints_Syn_GuardedExpression :: (ConstraintSet), counter_Syn_GuardedExpression :: (Int), dictionaryEnvironment_Syn_GuardedExpression :: (DictionaryEnvironment), fallthrough_Syn_GuardedExpression :: (Bool), infoTrees_Syn_GuardedExpression :: (InfoTrees), matchIO_Syn_GuardedExpression :: (IO ()), patternMatchWarnings_Syn_GuardedExpression :: ([Warning]), range_Syn_GuardedExpression :: (Range), self_Syn_GuardedExpression :: (GuardedExpression), unboundNames_Syn_GuardedExpression :: (Names), uniqueChunk_Syn_GuardedExpression :: (Int), uniqueSecondRound_Syn_GuardedExpression :: (Int), unrwar_Syn_GuardedExpression :: (Warning) }
wrap_GuardedExpression :: T_GuardedExpression -> Inh_GuardedExpression -> (Syn_GuardedExpression )
wrap_GuardedExpression (T_GuardedExpression act) (Inh_GuardedExpression _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsInumberOfGuards _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_GuardedExpression_vIn61 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsInumberOfGuards _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound
(T_GuardedExpression_vOut61 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrange _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound _lhsOunrwar) <- return (inv_GuardedExpression_s62 sem arg)
return (Syn_GuardedExpression _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrange _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound _lhsOunrwar)
)
sem_GuardedExpression :: GuardedExpression -> T_GuardedExpression
sem_GuardedExpression ( GuardedExpression_GuardedExpression range_ guard_ expression_ ) = sem_GuardedExpression_GuardedExpression ( sem_Range range_ ) ( sem_Expression guard_ ) ( sem_Expression expression_ )
newtype T_GuardedExpression = T_GuardedExpression {
attach_T_GuardedExpression :: Identity (T_GuardedExpression_s62 )
}
newtype T_GuardedExpression_s62 = C_GuardedExpression_s62 {
inv_GuardedExpression_s62 :: (T_GuardedExpression_v61 )
}
data T_GuardedExpression_s63 = C_GuardedExpression_s63
type T_GuardedExpression_v61 = (T_GuardedExpression_vIn61 ) -> (T_GuardedExpression_vOut61 )
data T_GuardedExpression_vIn61 = T_GuardedExpression_vIn61 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Tp) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (Int) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Int) (Int)
data T_GuardedExpression_vOut61 = T_GuardedExpression_vOut61 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) (Bool) (InfoTrees) (IO ()) ([Warning]) (Range) (GuardedExpression) (Names) (Int) (Int) (Warning)
sem_GuardedExpression_GuardedExpression :: T_Range -> T_Expression -> T_Expression -> T_GuardedExpression
sem_GuardedExpression_GuardedExpression arg_range_ arg_guard_ arg_expression_ = T_GuardedExpression (return st62) where
st62 = let
v61 :: T_GuardedExpression_v61
v61 = \ (T_GuardedExpression_vIn61 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsInumberOfGuards _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_guardX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_guard_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _guardIassumptions _guardIbeta _guardIbetaUnique _guardIcollectErrors _guardIcollectInstances _guardIcollectWarnings _guardIconstraints _guardIcounter _guardIdictionaryEnvironment _guardIinfoTree _guardImatchIO _guardImatches _guardIpatternMatchWarnings _guardIself _guardIunboundNames _guardIuniqueChunk _guardIuniqueSecondRound) = inv_Expression_s41 _guardX41 (T_Expression_vIn40 _guardOallPatterns _guardOallTypeSchemes _guardOavailablePredicates _guardObetaUnique _guardOclassEnvironment _guardOcollectErrors _guardOcollectWarnings _guardOcounter _guardOcurrentChunk _guardOdictionaryEnvironment _guardOimportEnvironment _guardOmatchIO _guardOmonos _guardOnamesInScope _guardOorderedTypeSynonyms _guardOparentTree _guardOpatternMatchWarnings _guardOsubstitution _guardOtryPatterns _guardOtypeschemeMap _guardOuniqueChunk _guardOuniqueSecondRound)
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2253 _expressionIconstraints _guardIconstraints _newconExpr _newconGuard
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2254 _expressionIassumptions _guardIassumptions
_newconGuard = rule2255 _cinfoGuard _guardIbeta
_newconExpr = rule2256 _cinfoExpr _expressionIbeta _lhsIbetaRight
_cinfoGuard = rule2257 _guardIinfoTree
_cinfoExpr = rule2258 _expressionIinfoTree _lhsIbetaRight _lhsInumberOfGuards _lhsIparentTree
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2259 _expressionIinfoTree _guardIinfoTree
_guardOtryPatterns = rule2260 ()
_expressionOtryPatterns = rule2261 ()
_lhsOfallthrough :: Bool
_lhsOfallthrough = rule2262 _guardIself
_lhsOunrwar :: Warning
_lhsOunrwar = rule2263 _guardIself _rangeIself
_lhsOrange :: Range
_lhsOrange = rule2264 _rangeIself
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2265 _expressionIcollectInstances _guardIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2266 _expressionIunboundNames _guardIunboundNames
_self = rule2267 _expressionIself _guardIself _rangeIself
_lhsOself :: GuardedExpression
_lhsOself = rule2268 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2269 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2270 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2271 _expressionIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule2272 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2273 _expressionIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2274 _expressionImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2275 _expressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2276 _expressionIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule2277 _expressionIuniqueSecondRound
_guardOallPatterns = rule2278 _lhsIallPatterns
_guardOallTypeSchemes = rule2279 _lhsIallTypeSchemes
_guardOavailablePredicates = rule2280 _lhsIavailablePredicates
_guardObetaUnique = rule2281 _lhsIbetaUnique
_guardOclassEnvironment = rule2282 _lhsIclassEnvironment
_guardOcollectErrors = rule2283 _lhsIcollectErrors
_guardOcollectWarnings = rule2284 _lhsIcollectWarnings
_guardOcounter = rule2285 _lhsIcounter
_guardOcurrentChunk = rule2286 _lhsIcurrentChunk
_guardOdictionaryEnvironment = rule2287 _lhsIdictionaryEnvironment
_guardOimportEnvironment = rule2288 _lhsIimportEnvironment
_guardOmatchIO = rule2289 _lhsImatchIO
_guardOmonos = rule2290 _lhsImonos
_guardOnamesInScope = rule2291 _lhsInamesInScope
_guardOorderedTypeSynonyms = rule2292 _lhsIorderedTypeSynonyms
_guardOparentTree = rule2293 _lhsIparentTree
_guardOpatternMatchWarnings = rule2294 _lhsIpatternMatchWarnings
_guardOsubstitution = rule2295 _lhsIsubstitution
_guardOtypeschemeMap = rule2296 _lhsItypeschemeMap
_guardOuniqueChunk = rule2297 _lhsIuniqueChunk
_guardOuniqueSecondRound = rule2298 _lhsIuniqueSecondRound
_expressionOallPatterns = rule2299 _lhsIallPatterns
_expressionOallTypeSchemes = rule2300 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule2301 _lhsIavailablePredicates
_expressionObetaUnique = rule2302 _guardIbetaUnique
_expressionOclassEnvironment = rule2303 _lhsIclassEnvironment
_expressionOcollectErrors = rule2304 _guardIcollectErrors
_expressionOcollectWarnings = rule2305 _guardIcollectWarnings
_expressionOcounter = rule2306 _guardIcounter
_expressionOcurrentChunk = rule2307 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule2308 _guardIdictionaryEnvironment
_expressionOimportEnvironment = rule2309 _lhsIimportEnvironment
_expressionOmatchIO = rule2310 _guardImatchIO
_expressionOmonos = rule2311 _lhsImonos
_expressionOnamesInScope = rule2312 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule2313 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule2314 _lhsIparentTree
_expressionOpatternMatchWarnings = rule2315 _guardIpatternMatchWarnings
_expressionOsubstitution = rule2316 _lhsIsubstitution
_expressionOtypeschemeMap = rule2317 _lhsItypeschemeMap
_expressionOuniqueChunk = rule2318 _guardIuniqueChunk
_expressionOuniqueSecondRound = rule2319 _guardIuniqueSecondRound
__result_ = T_GuardedExpression_vOut61 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOrange _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound _lhsOunrwar
in __result_ )
in C_GuardedExpression_s62 v61
rule2253 = \ ((_expressionIconstraints) :: ConstraintSet) ((_guardIconstraints) :: ConstraintSet) _newconExpr _newconGuard ->
Node [ _newconGuard .<. _guardIconstraints
, _newconExpr .<. _expressionIconstraints
]
rule2254 = \ ((_expressionIassumptions) :: Assumptions) ((_guardIassumptions) :: Assumptions) ->
_guardIassumptions `combine` _expressionIassumptions
rule2255 = \ _cinfoGuard ((_guardIbeta) :: Tp) ->
[ (_guardIbeta .==. boolType) _cinfoGuard ]
rule2256 = \ _cinfoExpr ((_expressionIbeta) :: Tp) ((_lhsIbetaRight) :: Tp) ->
[ (_expressionIbeta .==. _lhsIbetaRight) _cinfoExpr ]
rule2257 = \ ((_guardIinfoTree) :: InfoTree) ->
resultConstraint "guard" _guardIinfoTree
[]
rule2258 = \ ((_expressionIinfoTree) :: InfoTree) ((_lhsIbetaRight) :: Tp) ((_lhsInumberOfGuards) :: Int) ((_lhsIparentTree) :: InfoTree) ->
resultConstraint "guarded expression" _expressionIinfoTree $
[ HasTrustFactor 10.0 | _lhsInumberOfGuards < 2 ] ++
[ Unifier (head (ftv _lhsIbetaRight)) ("right-hand sides", attribute (skip_UHA_FB_RHS _lhsIparentTree), "right-hand side") ]
rule2259 = \ ((_expressionIinfoTree) :: InfoTree) ((_guardIinfoTree) :: InfoTree) ->
[_guardIinfoTree, _expressionIinfoTree]
rule2260 = \ (_ :: ()) ->
[]
rule2261 = \ (_ :: ()) ->
[]
rule2262 = \ ((_guardIself) :: Expression) ->
case _guardIself
of Expression_Variable _ (Name_Identifier _ _ "otherwise") -> False
Expression_Constructor _ (Name_Identifier _ _ "True" ) -> False
_ -> True
rule2263 = \ ((_guardIself) :: Expression) ((_rangeIself) :: Range) ->
UnreachableGuard _rangeIself _guardIself
rule2264 = \ ((_rangeIself) :: Range) ->
_rangeIself
rule2265 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ((_guardIcollectInstances) :: [(Name, Instance)]) ->
_guardIcollectInstances ++ _expressionIcollectInstances
rule2266 = \ ((_expressionIunboundNames) :: Names) ((_guardIunboundNames) :: Names) ->
_guardIunboundNames ++ _expressionIunboundNames
rule2267 = \ ((_expressionIself) :: Expression) ((_guardIself) :: Expression) ((_rangeIself) :: Range) ->
GuardedExpression_GuardedExpression _rangeIself _guardIself _expressionIself
rule2268 = \ _self ->
_self
rule2269 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule2270 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule2271 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule2272 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule2273 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule2274 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule2275 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule2276 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule2277 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule2278 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule2279 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule2280 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule2281 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2282 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule2283 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2284 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2285 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2286 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule2287 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2288 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2289 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2290 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2291 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2292 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule2293 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2294 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2295 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2296 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2297 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule2298 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule2299 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule2300 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule2301 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule2302 = \ ((_guardIbetaUnique) :: Int) ->
_guardIbetaUnique
rule2303 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule2304 = \ ((_guardIcollectErrors) :: TypeErrors) ->
_guardIcollectErrors
rule2305 = \ ((_guardIcollectWarnings) :: Warnings) ->
_guardIcollectWarnings
rule2306 = \ ((_guardIcounter) :: Int) ->
_guardIcounter
rule2307 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule2308 = \ ((_guardIdictionaryEnvironment) :: DictionaryEnvironment) ->
_guardIdictionaryEnvironment
rule2309 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2310 = \ ((_guardImatchIO) :: IO ()) ->
_guardImatchIO
rule2311 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2312 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2313 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule2314 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2315 = \ ((_guardIpatternMatchWarnings) :: [Warning]) ->
_guardIpatternMatchWarnings
rule2316 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2317 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2318 = \ ((_guardIuniqueChunk) :: Int) ->
_guardIuniqueChunk
rule2319 = \ ((_guardIuniqueSecondRound) :: Int) ->
_guardIuniqueSecondRound
data Inh_GuardedExpressions = Inh_GuardedExpressions { allPatterns_Inh_GuardedExpressions :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_GuardedExpressions :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_GuardedExpressions :: (Predicates), betaRight_Inh_GuardedExpressions :: (Tp), betaUnique_Inh_GuardedExpressions :: (Int), classEnvironment_Inh_GuardedExpressions :: (ClassEnvironment), collectErrors_Inh_GuardedExpressions :: (TypeErrors), collectWarnings_Inh_GuardedExpressions :: (Warnings), counter_Inh_GuardedExpressions :: (Int), currentChunk_Inh_GuardedExpressions :: (Int), dictionaryEnvironment_Inh_GuardedExpressions :: (DictionaryEnvironment), importEnvironment_Inh_GuardedExpressions :: (ImportEnvironment), matchIO_Inh_GuardedExpressions :: (IO ()), monos_Inh_GuardedExpressions :: (Monos), namesInScope_Inh_GuardedExpressions :: (Names), numberOfGuards_Inh_GuardedExpressions :: (Int), open_Inh_GuardedExpressions :: (Bool), orderedTypeSynonyms_Inh_GuardedExpressions :: (OrderedTypeSynonyms), parentTree_Inh_GuardedExpressions :: (InfoTree), patternMatchWarnings_Inh_GuardedExpressions :: ([Warning]), substitution_Inh_GuardedExpressions :: (FixpointSubstitution), typeschemeMap_Inh_GuardedExpressions :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_GuardedExpressions :: (Int), uniqueSecondRound_Inh_GuardedExpressions :: (Int) }
data Syn_GuardedExpressions = Syn_GuardedExpressions { assumptions_Syn_GuardedExpressions :: (Assumptions), betaUnique_Syn_GuardedExpressions :: (Int), collectErrors_Syn_GuardedExpressions :: (TypeErrors), collectInstances_Syn_GuardedExpressions :: ([(Name, Instance)]), collectWarnings_Syn_GuardedExpressions :: (Warnings), constraintslist_Syn_GuardedExpressions :: (ConstraintSets), counter_Syn_GuardedExpressions :: (Int), dictionaryEnvironment_Syn_GuardedExpressions :: (DictionaryEnvironment), fallthrough_Syn_GuardedExpressions :: (Bool), infoTrees_Syn_GuardedExpressions :: (InfoTrees), matchIO_Syn_GuardedExpressions :: (IO ()), patternMatchWarnings_Syn_GuardedExpressions :: ([Warning]), self_Syn_GuardedExpressions :: (GuardedExpressions), unboundNames_Syn_GuardedExpressions :: (Names), uniqueChunk_Syn_GuardedExpressions :: (Int), uniqueSecondRound_Syn_GuardedExpressions :: (Int) }
wrap_GuardedExpressions :: T_GuardedExpressions -> Inh_GuardedExpressions -> (Syn_GuardedExpressions )
wrap_GuardedExpressions (T_GuardedExpressions act) (Inh_GuardedExpressions _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsInumberOfGuards _lhsIopen _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_GuardedExpressions_vIn64 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsInumberOfGuards _lhsIopen _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound
(T_GuardedExpressions_vOut64 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound) <- return (inv_GuardedExpressions_s65 sem arg)
return (Syn_GuardedExpressions _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound)
)
sem_GuardedExpressions :: GuardedExpressions -> T_GuardedExpressions
sem_GuardedExpressions list = Prelude.foldr sem_GuardedExpressions_Cons sem_GuardedExpressions_Nil (Prelude.map sem_GuardedExpression list)
newtype T_GuardedExpressions = T_GuardedExpressions {
attach_T_GuardedExpressions :: Identity (T_GuardedExpressions_s65 )
}
newtype T_GuardedExpressions_s65 = C_GuardedExpressions_s65 {
inv_GuardedExpressions_s65 :: (T_GuardedExpressions_v64 )
}
data T_GuardedExpressions_s66 = C_GuardedExpressions_s66
type T_GuardedExpressions_v64 = (T_GuardedExpressions_vIn64 ) -> (T_GuardedExpressions_vOut64 )
data T_GuardedExpressions_vIn64 = T_GuardedExpressions_vIn64 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Tp) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (Int) (Bool) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Int) (Int)
data T_GuardedExpressions_vOut64 = T_GuardedExpressions_vOut64 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSets) (Int) (DictionaryEnvironment) (Bool) (InfoTrees) (IO ()) ([Warning]) (GuardedExpressions) (Names) (Int) (Int)
sem_GuardedExpressions_Cons :: T_GuardedExpression -> T_GuardedExpressions -> T_GuardedExpressions
sem_GuardedExpressions_Cons arg_hd_ arg_tl_ = T_GuardedExpressions (return st65) where
st65 = let
v64 :: T_GuardedExpressions_v64
v64 = \ (T_GuardedExpressions_vIn64 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsInumberOfGuards _lhsIopen _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_hdX62 = Control.Monad.Identity.runIdentity (attach_T_GuardedExpression (arg_hd_))
_tlX65 = Control.Monad.Identity.runIdentity (attach_T_GuardedExpressions (arg_tl_))
(T_GuardedExpression_vOut61 _hdIassumptions _hdIbetaUnique _hdIcollectErrors _hdIcollectInstances _hdIcollectWarnings _hdIconstraints _hdIcounter _hdIdictionaryEnvironment _hdIfallthrough _hdIinfoTrees _hdImatchIO _hdIpatternMatchWarnings _hdIrange _hdIself _hdIunboundNames _hdIuniqueChunk _hdIuniqueSecondRound _hdIunrwar) = inv_GuardedExpression_s62 _hdX62 (T_GuardedExpression_vIn61 _hdOallPatterns _hdOallTypeSchemes _hdOavailablePredicates _hdObetaRight _hdObetaUnique _hdOclassEnvironment _hdOcollectErrors _hdOcollectWarnings _hdOcounter _hdOcurrentChunk _hdOdictionaryEnvironment _hdOimportEnvironment _hdOmatchIO _hdOmonos _hdOnamesInScope _hdOnumberOfGuards _hdOorderedTypeSynonyms _hdOparentTree _hdOpatternMatchWarnings _hdOsubstitution _hdOtypeschemeMap _hdOuniqueChunk _hdOuniqueSecondRound)
(T_GuardedExpressions_vOut64 _tlIassumptions _tlIbetaUnique _tlIcollectErrors _tlIcollectInstances _tlIcollectWarnings _tlIconstraintslist _tlIcounter _tlIdictionaryEnvironment _tlIfallthrough _tlIinfoTrees _tlImatchIO _tlIpatternMatchWarnings _tlIself _tlIunboundNames _tlIuniqueChunk _tlIuniqueSecondRound) = inv_GuardedExpressions_s65 _tlX65 (T_GuardedExpressions_vIn64 _tlOallPatterns _tlOallTypeSchemes _tlOavailablePredicates _tlObetaRight _tlObetaUnique _tlOclassEnvironment _tlOcollectErrors _tlOcollectWarnings _tlOcounter _tlOcurrentChunk _tlOdictionaryEnvironment _tlOimportEnvironment _tlOmatchIO _tlOmonos _tlOnamesInScope _tlOnumberOfGuards _tlOopen _tlOorderedTypeSynonyms _tlOparentTree _tlOpatternMatchWarnings _tlOsubstitution _tlOtypeschemeMap _tlOuniqueChunk _tlOuniqueSecondRound)
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2320 _hdIassumptions _tlIassumptions
_lhsOconstraintslist :: ConstraintSets
_lhsOconstraintslist = rule2321 _hdIconstraints _tlIconstraintslist
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2322 _hdIinfoTrees _tlIinfoTrees
_lhsOfallthrough :: Bool
_lhsOfallthrough = rule2323 _hdIfallthrough _tlIfallthrough
_tlOopen = rule2324 _hdIfallthrough _lhsIopen
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2325 _hdIunrwar _lhsIopen _tlIpatternMatchWarnings
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2326 _hdIcollectInstances _tlIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2327 _hdIunboundNames _tlIunboundNames
_self = rule2328 _hdIself _tlIself
_lhsOself :: GuardedExpressions
_lhsOself = rule2329 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2330 _tlIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2331 _tlIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2332 _tlIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule2333 _tlIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2334 _tlIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2335 _tlImatchIO
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2336 _tlIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule2337 _tlIuniqueSecondRound
_hdOallPatterns = rule2338 _lhsIallPatterns
_hdOallTypeSchemes = rule2339 _lhsIallTypeSchemes
_hdOavailablePredicates = rule2340 _lhsIavailablePredicates
_hdObetaRight = rule2341 _lhsIbetaRight
_hdObetaUnique = rule2342 _lhsIbetaUnique
_hdOclassEnvironment = rule2343 _lhsIclassEnvironment
_hdOcollectErrors = rule2344 _lhsIcollectErrors
_hdOcollectWarnings = rule2345 _lhsIcollectWarnings
_hdOcounter = rule2346 _lhsIcounter
_hdOcurrentChunk = rule2347 _lhsIcurrentChunk
_hdOdictionaryEnvironment = rule2348 _lhsIdictionaryEnvironment
_hdOimportEnvironment = rule2349 _lhsIimportEnvironment
_hdOmatchIO = rule2350 _lhsImatchIO
_hdOmonos = rule2351 _lhsImonos
_hdOnamesInScope = rule2352 _lhsInamesInScope
_hdOnumberOfGuards = rule2353 _lhsInumberOfGuards
_hdOorderedTypeSynonyms = rule2354 _lhsIorderedTypeSynonyms
_hdOparentTree = rule2355 _lhsIparentTree
_hdOpatternMatchWarnings = rule2356 _lhsIpatternMatchWarnings
_hdOsubstitution = rule2357 _lhsIsubstitution
_hdOtypeschemeMap = rule2358 _lhsItypeschemeMap
_hdOuniqueChunk = rule2359 _lhsIuniqueChunk
_hdOuniqueSecondRound = rule2360 _lhsIuniqueSecondRound
_tlOallPatterns = rule2361 _lhsIallPatterns
_tlOallTypeSchemes = rule2362 _lhsIallTypeSchemes
_tlOavailablePredicates = rule2363 _lhsIavailablePredicates
_tlObetaRight = rule2364 _lhsIbetaRight
_tlObetaUnique = rule2365 _hdIbetaUnique
_tlOclassEnvironment = rule2366 _lhsIclassEnvironment
_tlOcollectErrors = rule2367 _hdIcollectErrors
_tlOcollectWarnings = rule2368 _hdIcollectWarnings
_tlOcounter = rule2369 _hdIcounter
_tlOcurrentChunk = rule2370 _lhsIcurrentChunk
_tlOdictionaryEnvironment = rule2371 _hdIdictionaryEnvironment
_tlOimportEnvironment = rule2372 _lhsIimportEnvironment
_tlOmatchIO = rule2373 _hdImatchIO
_tlOmonos = rule2374 _lhsImonos
_tlOnamesInScope = rule2375 _lhsInamesInScope
_tlOnumberOfGuards = rule2376 _lhsInumberOfGuards
_tlOorderedTypeSynonyms = rule2377 _lhsIorderedTypeSynonyms
_tlOparentTree = rule2378 _lhsIparentTree
_tlOpatternMatchWarnings = rule2379 _hdIpatternMatchWarnings
_tlOsubstitution = rule2380 _lhsIsubstitution
_tlOtypeschemeMap = rule2381 _lhsItypeschemeMap
_tlOuniqueChunk = rule2382 _hdIuniqueChunk
_tlOuniqueSecondRound = rule2383 _hdIuniqueSecondRound
__result_ = T_GuardedExpressions_vOut64 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_GuardedExpressions_s65 v64
rule2320 = \ ((_hdIassumptions) :: Assumptions) ((_tlIassumptions) :: Assumptions) ->
_hdIassumptions `combine` _tlIassumptions
rule2321 = \ ((_hdIconstraints) :: ConstraintSet) ((_tlIconstraintslist) :: ConstraintSets) ->
_hdIconstraints : _tlIconstraintslist
rule2322 = \ ((_hdIinfoTrees) :: InfoTrees) ((_tlIinfoTrees) :: InfoTrees) ->
_hdIinfoTrees ++ _tlIinfoTrees
rule2323 = \ ((_hdIfallthrough) :: Bool) ((_tlIfallthrough) :: Bool) ->
_hdIfallthrough && _tlIfallthrough
rule2324 = \ ((_hdIfallthrough) :: Bool) ((_lhsIopen) :: Bool) ->
_hdIfallthrough && _lhsIopen
rule2325 = \ ((_hdIunrwar) :: Warning) ((_lhsIopen) :: Bool) ((_tlIpatternMatchWarnings) :: [Warning]) ->
(if not _lhsIopen then [_hdIunrwar] else [])
++ _tlIpatternMatchWarnings
rule2326 = \ ((_hdIcollectInstances) :: [(Name, Instance)]) ((_tlIcollectInstances) :: [(Name, Instance)]) ->
_hdIcollectInstances ++ _tlIcollectInstances
rule2327 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule2328 = \ ((_hdIself) :: GuardedExpression) ((_tlIself) :: GuardedExpressions) ->
(:) _hdIself _tlIself
rule2329 = \ _self ->
_self
rule2330 = \ ((_tlIbetaUnique) :: Int) ->
_tlIbetaUnique
rule2331 = \ ((_tlIcollectErrors) :: TypeErrors) ->
_tlIcollectErrors
rule2332 = \ ((_tlIcollectWarnings) :: Warnings) ->
_tlIcollectWarnings
rule2333 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule2334 = \ ((_tlIdictionaryEnvironment) :: DictionaryEnvironment) ->
_tlIdictionaryEnvironment
rule2335 = \ ((_tlImatchIO) :: IO ()) ->
_tlImatchIO
rule2336 = \ ((_tlIuniqueChunk) :: Int) ->
_tlIuniqueChunk
rule2337 = \ ((_tlIuniqueSecondRound) :: Int) ->
_tlIuniqueSecondRound
rule2338 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule2339 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule2340 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule2341 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule2342 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2343 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule2344 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2345 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2346 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2347 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule2348 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2349 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2350 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2351 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2352 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2353 = \ ((_lhsInumberOfGuards) :: Int) ->
_lhsInumberOfGuards
rule2354 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule2355 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2356 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2357 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2358 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2359 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule2360 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule2361 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule2362 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule2363 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule2364 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule2365 = \ ((_hdIbetaUnique) :: Int) ->
_hdIbetaUnique
rule2366 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule2367 = \ ((_hdIcollectErrors) :: TypeErrors) ->
_hdIcollectErrors
rule2368 = \ ((_hdIcollectWarnings) :: Warnings) ->
_hdIcollectWarnings
rule2369 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule2370 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule2371 = \ ((_hdIdictionaryEnvironment) :: DictionaryEnvironment) ->
_hdIdictionaryEnvironment
rule2372 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2373 = \ ((_hdImatchIO) :: IO ()) ->
_hdImatchIO
rule2374 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2375 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2376 = \ ((_lhsInumberOfGuards) :: Int) ->
_lhsInumberOfGuards
rule2377 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule2378 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2379 = \ ((_hdIpatternMatchWarnings) :: [Warning]) ->
_hdIpatternMatchWarnings
rule2380 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2381 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2382 = \ ((_hdIuniqueChunk) :: Int) ->
_hdIuniqueChunk
rule2383 = \ ((_hdIuniqueSecondRound) :: Int) ->
_hdIuniqueSecondRound
sem_GuardedExpressions_Nil :: T_GuardedExpressions
sem_GuardedExpressions_Nil = T_GuardedExpressions (return st65) where
st65 = let
v64 :: T_GuardedExpressions_v64
v64 = \ (T_GuardedExpressions_vIn64 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsInumberOfGuards _lhsIopen _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2384 ()
_lhsOconstraintslist :: ConstraintSets
_lhsOconstraintslist = rule2385 ()
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2386 ()
_lhsOfallthrough :: Bool
_lhsOfallthrough = rule2387 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2388 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2389 ()
_self = rule2390 ()
_lhsOself :: GuardedExpressions
_lhsOself = rule2391 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2392 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2393 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2394 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule2395 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2396 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2397 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2398 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2399 _lhsIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule2400 _lhsIuniqueSecondRound
__result_ = T_GuardedExpressions_vOut64 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraintslist _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTrees _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_GuardedExpressions_s65 v64
rule2384 = \ (_ :: ()) ->
noAssumptions
rule2385 = \ (_ :: ()) ->
[]
rule2386 = \ (_ :: ()) ->
[]
rule2387 = \ (_ :: ()) ->
True
rule2388 = \ (_ :: ()) ->
[]
rule2389 = \ (_ :: ()) ->
[]
rule2390 = \ (_ :: ()) ->
[]
rule2391 = \ _self ->
_self
rule2392 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2393 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2394 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2395 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2396 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2397 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2398 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2399 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule2400 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
data Inh_Import = Inh_Import { }
data Syn_Import = Syn_Import { self_Syn_Import :: (Import) }
wrap_Import :: T_Import -> Inh_Import -> (Syn_Import )
wrap_Import (T_Import act) (Inh_Import ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Import_vIn67
(T_Import_vOut67 _lhsOself) <- return (inv_Import_s68 sem arg)
return (Syn_Import _lhsOself)
)
sem_Import :: Import -> T_Import
sem_Import ( Import_Variable range_ name_ ) = sem_Import_Variable ( sem_Range range_ ) ( sem_Name name_ )
sem_Import ( Import_TypeOrClass range_ name_ names_ ) = sem_Import_TypeOrClass ( sem_Range range_ ) ( sem_Name name_ ) ( sem_MaybeNames names_ )
sem_Import ( Import_TypeOrClassComplete range_ name_ ) = sem_Import_TypeOrClassComplete ( sem_Range range_ ) ( sem_Name name_ )
newtype T_Import = T_Import {
attach_T_Import :: Identity (T_Import_s68 )
}
newtype T_Import_s68 = C_Import_s68 {
inv_Import_s68 :: (T_Import_v67 )
}
data T_Import_s69 = C_Import_s69
type T_Import_v67 = (T_Import_vIn67 ) -> (T_Import_vOut67 )
data T_Import_vIn67 = T_Import_vIn67
data T_Import_vOut67 = T_Import_vOut67 (Import)
sem_Import_Variable :: T_Range -> T_Name -> T_Import
sem_Import_Variable arg_range_ arg_name_ = T_Import (return st68) where
st68 = let
v67 :: T_Import_v67
v67 = \ (T_Import_vIn67 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_self = rule2401 _nameIself _rangeIself
_lhsOself :: Import
_lhsOself = rule2402 _self
__result_ = T_Import_vOut67 _lhsOself
in __result_ )
in C_Import_s68 v67
rule2401 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Import_Variable _rangeIself _nameIself
rule2402 = \ _self ->
_self
sem_Import_TypeOrClass :: T_Range -> T_Name -> T_MaybeNames -> T_Import
sem_Import_TypeOrClass arg_range_ arg_name_ arg_names_ = T_Import (return st68) where
st68 = let
v67 :: T_Import_v67
v67 = \ (T_Import_vIn67 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_namesX107 = Control.Monad.Identity.runIdentity (attach_T_MaybeNames (arg_names_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_MaybeNames_vOut106 _namesIself) = inv_MaybeNames_s107 _namesX107 (T_MaybeNames_vIn106 )
_self = rule2403 _nameIself _namesIself _rangeIself
_lhsOself :: Import
_lhsOself = rule2404 _self
__result_ = T_Import_vOut67 _lhsOself
in __result_ )
in C_Import_s68 v67
rule2403 = \ ((_nameIself) :: Name) ((_namesIself) :: MaybeNames) ((_rangeIself) :: Range) ->
Import_TypeOrClass _rangeIself _nameIself _namesIself
rule2404 = \ _self ->
_self
sem_Import_TypeOrClassComplete :: T_Range -> T_Name -> T_Import
sem_Import_TypeOrClassComplete arg_range_ arg_name_ = T_Import (return st68) where
st68 = let
v67 :: T_Import_v67
v67 = \ (T_Import_vIn67 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_self = rule2405 _nameIself _rangeIself
_lhsOself :: Import
_lhsOself = rule2406 _self
__result_ = T_Import_vOut67 _lhsOself
in __result_ )
in C_Import_s68 v67
rule2405 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Import_TypeOrClassComplete _rangeIself _nameIself
rule2406 = \ _self ->
_self
data Inh_ImportDeclaration = Inh_ImportDeclaration { }
data Syn_ImportDeclaration = Syn_ImportDeclaration { self_Syn_ImportDeclaration :: (ImportDeclaration) }
wrap_ImportDeclaration :: T_ImportDeclaration -> Inh_ImportDeclaration -> (Syn_ImportDeclaration )
wrap_ImportDeclaration (T_ImportDeclaration act) (Inh_ImportDeclaration ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_ImportDeclaration_vIn70
(T_ImportDeclaration_vOut70 _lhsOself) <- return (inv_ImportDeclaration_s71 sem arg)
return (Syn_ImportDeclaration _lhsOself)
)
sem_ImportDeclaration :: ImportDeclaration -> T_ImportDeclaration
sem_ImportDeclaration ( ImportDeclaration_Import range_ qualified_ name_ asname_ importspecification_ ) = sem_ImportDeclaration_Import ( sem_Range range_ ) qualified_ ( sem_Name name_ ) ( sem_MaybeName asname_ ) ( sem_MaybeImportSpecification importspecification_ )
sem_ImportDeclaration ( ImportDeclaration_Empty range_ ) = sem_ImportDeclaration_Empty ( sem_Range range_ )
newtype T_ImportDeclaration = T_ImportDeclaration {
attach_T_ImportDeclaration :: Identity (T_ImportDeclaration_s71 )
}
newtype T_ImportDeclaration_s71 = C_ImportDeclaration_s71 {
inv_ImportDeclaration_s71 :: (T_ImportDeclaration_v70 )
}
data T_ImportDeclaration_s72 = C_ImportDeclaration_s72
type T_ImportDeclaration_v70 = (T_ImportDeclaration_vIn70 ) -> (T_ImportDeclaration_vOut70 )
data T_ImportDeclaration_vIn70 = T_ImportDeclaration_vIn70
data T_ImportDeclaration_vOut70 = T_ImportDeclaration_vOut70 (ImportDeclaration)
sem_ImportDeclaration_Import :: T_Range -> (Bool) -> T_Name -> T_MaybeName -> T_MaybeImportSpecification -> T_ImportDeclaration
sem_ImportDeclaration_Import arg_range_ arg_qualified_ arg_name_ arg_asname_ arg_importspecification_ = T_ImportDeclaration (return st71) where
st71 = let
v70 :: T_ImportDeclaration_v70
v70 = \ (T_ImportDeclaration_vIn70 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_asnameX104 = Control.Monad.Identity.runIdentity (attach_T_MaybeName (arg_asname_))
_importspecificationX98 = Control.Monad.Identity.runIdentity (attach_T_MaybeImportSpecification (arg_importspecification_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_MaybeName_vOut103 _asnameIself) = inv_MaybeName_s104 _asnameX104 (T_MaybeName_vIn103 )
(T_MaybeImportSpecification_vOut97 _importspecificationIself) = inv_MaybeImportSpecification_s98 _importspecificationX98 (T_MaybeImportSpecification_vIn97 )
_self = rule2407 _asnameIself _importspecificationIself _nameIself _rangeIself arg_qualified_
_lhsOself :: ImportDeclaration
_lhsOself = rule2408 _self
__result_ = T_ImportDeclaration_vOut70 _lhsOself
in __result_ )
in C_ImportDeclaration_s71 v70
rule2407 = \ ((_asnameIself) :: MaybeName) ((_importspecificationIself) :: MaybeImportSpecification) ((_nameIself) :: Name) ((_rangeIself) :: Range) qualified_ ->
ImportDeclaration_Import _rangeIself qualified_ _nameIself _asnameIself _importspecificationIself
rule2408 = \ _self ->
_self
sem_ImportDeclaration_Empty :: T_Range -> T_ImportDeclaration
sem_ImportDeclaration_Empty arg_range_ = T_ImportDeclaration (return st71) where
st71 = let
v70 :: T_ImportDeclaration_v70
v70 = \ (T_ImportDeclaration_vIn70 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_self = rule2409 _rangeIself
_lhsOself :: ImportDeclaration
_lhsOself = rule2410 _self
__result_ = T_ImportDeclaration_vOut70 _lhsOself
in __result_ )
in C_ImportDeclaration_s71 v70
rule2409 = \ ((_rangeIself) :: Range) ->
ImportDeclaration_Empty _rangeIself
rule2410 = \ _self ->
_self
data Inh_ImportDeclarations = Inh_ImportDeclarations { }
data Syn_ImportDeclarations = Syn_ImportDeclarations { self_Syn_ImportDeclarations :: (ImportDeclarations) }
wrap_ImportDeclarations :: T_ImportDeclarations -> Inh_ImportDeclarations -> (Syn_ImportDeclarations )
wrap_ImportDeclarations (T_ImportDeclarations act) (Inh_ImportDeclarations ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_ImportDeclarations_vIn73
(T_ImportDeclarations_vOut73 _lhsOself) <- return (inv_ImportDeclarations_s74 sem arg)
return (Syn_ImportDeclarations _lhsOself)
)
sem_ImportDeclarations :: ImportDeclarations -> T_ImportDeclarations
sem_ImportDeclarations list = Prelude.foldr sem_ImportDeclarations_Cons sem_ImportDeclarations_Nil (Prelude.map sem_ImportDeclaration list)
newtype T_ImportDeclarations = T_ImportDeclarations {
attach_T_ImportDeclarations :: Identity (T_ImportDeclarations_s74 )
}
newtype T_ImportDeclarations_s74 = C_ImportDeclarations_s74 {
inv_ImportDeclarations_s74 :: (T_ImportDeclarations_v73 )
}
data T_ImportDeclarations_s75 = C_ImportDeclarations_s75
type T_ImportDeclarations_v73 = (T_ImportDeclarations_vIn73 ) -> (T_ImportDeclarations_vOut73 )
data T_ImportDeclarations_vIn73 = T_ImportDeclarations_vIn73
data T_ImportDeclarations_vOut73 = T_ImportDeclarations_vOut73 (ImportDeclarations)
sem_ImportDeclarations_Cons :: T_ImportDeclaration -> T_ImportDeclarations -> T_ImportDeclarations
sem_ImportDeclarations_Cons arg_hd_ arg_tl_ = T_ImportDeclarations (return st74) where
st74 = let
v73 :: T_ImportDeclarations_v73
v73 = \ (T_ImportDeclarations_vIn73 ) -> ( let
_hdX71 = Control.Monad.Identity.runIdentity (attach_T_ImportDeclaration (arg_hd_))
_tlX74 = Control.Monad.Identity.runIdentity (attach_T_ImportDeclarations (arg_tl_))
(T_ImportDeclaration_vOut70 _hdIself) = inv_ImportDeclaration_s71 _hdX71 (T_ImportDeclaration_vIn70 )
(T_ImportDeclarations_vOut73 _tlIself) = inv_ImportDeclarations_s74 _tlX74 (T_ImportDeclarations_vIn73 )
_self = rule2411 _hdIself _tlIself
_lhsOself :: ImportDeclarations
_lhsOself = rule2412 _self
__result_ = T_ImportDeclarations_vOut73 _lhsOself
in __result_ )
in C_ImportDeclarations_s74 v73
rule2411 = \ ((_hdIself) :: ImportDeclaration) ((_tlIself) :: ImportDeclarations) ->
(:) _hdIself _tlIself
rule2412 = \ _self ->
_self
sem_ImportDeclarations_Nil :: T_ImportDeclarations
sem_ImportDeclarations_Nil = T_ImportDeclarations (return st74) where
st74 = let
v73 :: T_ImportDeclarations_v73
v73 = \ (T_ImportDeclarations_vIn73 ) -> ( let
_self = rule2413 ()
_lhsOself :: ImportDeclarations
_lhsOself = rule2414 _self
__result_ = T_ImportDeclarations_vOut73 _lhsOself
in __result_ )
in C_ImportDeclarations_s74 v73
rule2413 = \ (_ :: ()) ->
[]
rule2414 = \ _self ->
_self
data Inh_ImportSpecification = Inh_ImportSpecification { }
data Syn_ImportSpecification = Syn_ImportSpecification { self_Syn_ImportSpecification :: (ImportSpecification) }
wrap_ImportSpecification :: T_ImportSpecification -> Inh_ImportSpecification -> (Syn_ImportSpecification )
wrap_ImportSpecification (T_ImportSpecification act) (Inh_ImportSpecification ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_ImportSpecification_vIn76
(T_ImportSpecification_vOut76 _lhsOself) <- return (inv_ImportSpecification_s77 sem arg)
return (Syn_ImportSpecification _lhsOself)
)
sem_ImportSpecification :: ImportSpecification -> T_ImportSpecification
sem_ImportSpecification ( ImportSpecification_Import range_ hiding_ imports_ ) = sem_ImportSpecification_Import ( sem_Range range_ ) hiding_ ( sem_Imports imports_ )
newtype T_ImportSpecification = T_ImportSpecification {
attach_T_ImportSpecification :: Identity (T_ImportSpecification_s77 )
}
newtype T_ImportSpecification_s77 = C_ImportSpecification_s77 {
inv_ImportSpecification_s77 :: (T_ImportSpecification_v76 )
}
data T_ImportSpecification_s78 = C_ImportSpecification_s78
type T_ImportSpecification_v76 = (T_ImportSpecification_vIn76 ) -> (T_ImportSpecification_vOut76 )
data T_ImportSpecification_vIn76 = T_ImportSpecification_vIn76
data T_ImportSpecification_vOut76 = T_ImportSpecification_vOut76 (ImportSpecification)
sem_ImportSpecification_Import :: T_Range -> (Bool) -> T_Imports -> T_ImportSpecification
sem_ImportSpecification_Import arg_range_ arg_hiding_ arg_imports_ = T_ImportSpecification (return st77) where
st77 = let
v76 :: T_ImportSpecification_v76
v76 = \ (T_ImportSpecification_vIn76 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_importsX80 = Control.Monad.Identity.runIdentity (attach_T_Imports (arg_imports_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Imports_vOut79 _importsIself) = inv_Imports_s80 _importsX80 (T_Imports_vIn79 )
_self = rule2415 _importsIself _rangeIself arg_hiding_
_lhsOself :: ImportSpecification
_lhsOself = rule2416 _self
__result_ = T_ImportSpecification_vOut76 _lhsOself
in __result_ )
in C_ImportSpecification_s77 v76
rule2415 = \ ((_importsIself) :: Imports) ((_rangeIself) :: Range) hiding_ ->
ImportSpecification_Import _rangeIself hiding_ _importsIself
rule2416 = \ _self ->
_self
data Inh_Imports = Inh_Imports { }
data Syn_Imports = Syn_Imports { self_Syn_Imports :: (Imports) }
wrap_Imports :: T_Imports -> Inh_Imports -> (Syn_Imports )
wrap_Imports (T_Imports act) (Inh_Imports ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Imports_vIn79
(T_Imports_vOut79 _lhsOself) <- return (inv_Imports_s80 sem arg)
return (Syn_Imports _lhsOself)
)
sem_Imports :: Imports -> T_Imports
sem_Imports list = Prelude.foldr sem_Imports_Cons sem_Imports_Nil (Prelude.map sem_Import list)
newtype T_Imports = T_Imports {
attach_T_Imports :: Identity (T_Imports_s80 )
}
newtype T_Imports_s80 = C_Imports_s80 {
inv_Imports_s80 :: (T_Imports_v79 )
}
data T_Imports_s81 = C_Imports_s81
type T_Imports_v79 = (T_Imports_vIn79 ) -> (T_Imports_vOut79 )
data T_Imports_vIn79 = T_Imports_vIn79
data T_Imports_vOut79 = T_Imports_vOut79 (Imports)
sem_Imports_Cons :: T_Import -> T_Imports -> T_Imports
sem_Imports_Cons arg_hd_ arg_tl_ = T_Imports (return st80) where
st80 = let
v79 :: T_Imports_v79
v79 = \ (T_Imports_vIn79 ) -> ( let
_hdX68 = Control.Monad.Identity.runIdentity (attach_T_Import (arg_hd_))
_tlX80 = Control.Monad.Identity.runIdentity (attach_T_Imports (arg_tl_))
(T_Import_vOut67 _hdIself) = inv_Import_s68 _hdX68 (T_Import_vIn67 )
(T_Imports_vOut79 _tlIself) = inv_Imports_s80 _tlX80 (T_Imports_vIn79 )
_self = rule2417 _hdIself _tlIself
_lhsOself :: Imports
_lhsOself = rule2418 _self
__result_ = T_Imports_vOut79 _lhsOself
in __result_ )
in C_Imports_s80 v79
rule2417 = \ ((_hdIself) :: Import) ((_tlIself) :: Imports) ->
(:) _hdIself _tlIself
rule2418 = \ _self ->
_self
sem_Imports_Nil :: T_Imports
sem_Imports_Nil = T_Imports (return st80) where
st80 = let
v79 :: T_Imports_v79
v79 = \ (T_Imports_vIn79 ) -> ( let
_self = rule2419 ()
_lhsOself :: Imports
_lhsOself = rule2420 _self
__result_ = T_Imports_vOut79 _lhsOself
in __result_ )
in C_Imports_s80 v79
rule2419 = \ (_ :: ()) ->
[]
rule2420 = \ _self ->
_self
data Inh_LeftHandSide = Inh_LeftHandSide { betaUnique_Inh_LeftHandSide :: (Int), counter_Inh_LeftHandSide :: (Int), importEnvironment_Inh_LeftHandSide :: (ImportEnvironment), monos_Inh_LeftHandSide :: (Monos), namesInScope_Inh_LeftHandSide :: (Names), parentTree_Inh_LeftHandSide :: (InfoTree), patternMatchWarnings_Inh_LeftHandSide :: ([Warning]) }
data Syn_LeftHandSide = Syn_LeftHandSide { argcount_Syn_LeftHandSide :: (Int), betaUnique_Syn_LeftHandSide :: (Int), betas_Syn_LeftHandSide :: (Tps), constraints_Syn_LeftHandSide :: (ConstraintSet), counter_Syn_LeftHandSide :: (Int), elements_Syn_LeftHandSide :: ( [PatternElement] ), environment_Syn_LeftHandSide :: (PatternAssumptions), infoTrees_Syn_LeftHandSide :: (InfoTrees), name_Syn_LeftHandSide :: (Name), numberOfPatterns_Syn_LeftHandSide :: (Int), patVarNames_Syn_LeftHandSide :: (Names), patternMatchWarnings_Syn_LeftHandSide :: ([Warning]), self_Syn_LeftHandSide :: (LeftHandSide), unboundNames_Syn_LeftHandSide :: (Names) }
wrap_LeftHandSide :: T_LeftHandSide -> Inh_LeftHandSide -> (Syn_LeftHandSide )
wrap_LeftHandSide (T_LeftHandSide act) (Inh_LeftHandSide _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_LeftHandSide_vIn82 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings
(T_LeftHandSide_vOut82 _lhsOargcount _lhsObetaUnique _lhsObetas _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTrees _lhsOname _lhsOnumberOfPatterns _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames) <- return (inv_LeftHandSide_s83 sem arg)
return (Syn_LeftHandSide _lhsOargcount _lhsObetaUnique _lhsObetas _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTrees _lhsOname _lhsOnumberOfPatterns _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames)
)
sem_LeftHandSide :: LeftHandSide -> T_LeftHandSide
sem_LeftHandSide ( LeftHandSide_Function range_ name_ patterns_ ) = sem_LeftHandSide_Function ( sem_Range range_ ) ( sem_Name name_ ) ( sem_Patterns patterns_ )
sem_LeftHandSide ( LeftHandSide_Infix range_ leftPattern_ operator_ rightPattern_ ) = sem_LeftHandSide_Infix ( sem_Range range_ ) ( sem_Pattern leftPattern_ ) ( sem_Name operator_ ) ( sem_Pattern rightPattern_ )
sem_LeftHandSide ( LeftHandSide_Parenthesized range_ lefthandside_ patterns_ ) = sem_LeftHandSide_Parenthesized ( sem_Range range_ ) ( sem_LeftHandSide lefthandside_ ) ( sem_Patterns patterns_ )
newtype T_LeftHandSide = T_LeftHandSide {
attach_T_LeftHandSide :: Identity (T_LeftHandSide_s83 )
}
newtype T_LeftHandSide_s83 = C_LeftHandSide_s83 {
inv_LeftHandSide_s83 :: (T_LeftHandSide_v82 )
}
data T_LeftHandSide_s84 = C_LeftHandSide_s84
type T_LeftHandSide_v82 = (T_LeftHandSide_vIn82 ) -> (T_LeftHandSide_vOut82 )
data T_LeftHandSide_vIn82 = T_LeftHandSide_vIn82 (Int) (Int) (ImportEnvironment) (Monos) (Names) (InfoTree) ([Warning])
data T_LeftHandSide_vOut82 = T_LeftHandSide_vOut82 (Int) (Int) (Tps) (ConstraintSet) (Int) ( [PatternElement] ) (PatternAssumptions) (InfoTrees) (Name) (Int) (Names) ([Warning]) (LeftHandSide) (Names)
sem_LeftHandSide_Function :: T_Range -> T_Name -> T_Patterns -> T_LeftHandSide
sem_LeftHandSide_Function arg_range_ arg_name_ arg_patterns_ = T_LeftHandSide (return st83) where
st83 = let
v82 :: T_LeftHandSide_v82
v82 = \ (T_LeftHandSide_vIn82 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_patternsX122 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_patterns_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_Patterns_vOut121 _patternsIbetaUnique _patternsIbetas _patternsIconstraintslist _patternsIcounter _patternsIelementss _patternsIenvironment _patternsIinfoTrees _patternsInumberOfPatterns _patternsIpatVarNames _patternsIpatternMatchWarnings _patternsIself _patternsIunboundNames) = inv_Patterns_s122 _patternsX122 (T_Patterns_vIn121 _patternsObetaUnique _patternsOcounter _patternsOimportEnvironment _patternsOmonos _patternsOnamesInScope _patternsOparentTree _patternsOpatternMatchWarnings)
_lhsOname :: Name
_lhsOname = rule2421 _nameIself
_constraints = rule2422 _patternsIconstraintslist
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2423 _patternsIinfoTrees
_lhsOelements :: [PatternElement]
_lhsOelements = rule2424 _patternsIelementss
_lhsOargcount :: Int
_lhsOargcount = rule2425 _patternsIself
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2426 _patternsIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2427 _patternsIunboundNames
_self = rule2428 _nameIself _patternsIself _rangeIself
_lhsOself :: LeftHandSide
_lhsOself = rule2429 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2430 _patternsIbetaUnique
_lhsObetas :: Tps
_lhsObetas = rule2431 _patternsIbetas
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2432 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2433 _patternsIcounter
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2434 _patternsIenvironment
_lhsOnumberOfPatterns :: Int
_lhsOnumberOfPatterns = rule2435 _patternsInumberOfPatterns
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2436 _patternsIpatternMatchWarnings
_patternsObetaUnique = rule2437 _lhsIbetaUnique
_patternsOcounter = rule2438 _lhsIcounter
_patternsOimportEnvironment = rule2439 _lhsIimportEnvironment
_patternsOmonos = rule2440 _lhsImonos
_patternsOnamesInScope = rule2441 _lhsInamesInScope
_patternsOparentTree = rule2442 _lhsIparentTree
_patternsOpatternMatchWarnings = rule2443 _lhsIpatternMatchWarnings
__result_ = T_LeftHandSide_vOut82 _lhsOargcount _lhsObetaUnique _lhsObetas _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTrees _lhsOname _lhsOnumberOfPatterns _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_LeftHandSide_s83 v82
rule2421 = \ ((_nameIself) :: Name) ->
_nameIself
rule2422 = \ ((_patternsIconstraintslist) :: ConstraintSets) ->
Node _patternsIconstraintslist
rule2423 = \ ((_patternsIinfoTrees) :: InfoTrees) ->
_patternsIinfoTrees
rule2424 = \ ((_patternsIelementss) :: [ [PatternElement] ]) ->
concat _patternsIelementss
rule2425 = \ ((_patternsIself) :: Patterns) ->
length _patternsIself
rule2426 = \ ((_patternsIpatVarNames) :: Names) ->
_patternsIpatVarNames
rule2427 = \ ((_patternsIunboundNames) :: Names) ->
_patternsIunboundNames
rule2428 = \ ((_nameIself) :: Name) ((_patternsIself) :: Patterns) ((_rangeIself) :: Range) ->
LeftHandSide_Function _rangeIself _nameIself _patternsIself
rule2429 = \ _self ->
_self
rule2430 = \ ((_patternsIbetaUnique) :: Int) ->
_patternsIbetaUnique
rule2431 = \ ((_patternsIbetas) :: Tps) ->
_patternsIbetas
rule2432 = \ _constraints ->
_constraints
rule2433 = \ ((_patternsIcounter) :: Int) ->
_patternsIcounter
rule2434 = \ ((_patternsIenvironment) :: PatternAssumptions) ->
_patternsIenvironment
rule2435 = \ ((_patternsInumberOfPatterns) :: Int) ->
_patternsInumberOfPatterns
rule2436 = \ ((_patternsIpatternMatchWarnings) :: [Warning]) ->
_patternsIpatternMatchWarnings
rule2437 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2438 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2439 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2440 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2441 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2442 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2443 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_LeftHandSide_Infix :: T_Range -> T_Pattern -> T_Name -> T_Pattern -> T_LeftHandSide
sem_LeftHandSide_Infix arg_range_ arg_leftPattern_ arg_operator_ arg_rightPattern_ = T_LeftHandSide (return st83) where
st83 = let
v82 :: T_LeftHandSide_v82
v82 = \ (T_LeftHandSide_vIn82 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_leftPatternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_leftPattern_))
_operatorX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_operator_))
_rightPatternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_rightPattern_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Pattern_vOut118 _leftPatternIbeta _leftPatternIbetaUnique _leftPatternIconstraints _leftPatternIcounter _leftPatternIelements _leftPatternIenvironment _leftPatternIinfoTree _leftPatternIpatVarNames _leftPatternIpatternMatchWarnings _leftPatternIself _leftPatternIunboundNames) = inv_Pattern_s119 _leftPatternX119 (T_Pattern_vIn118 _leftPatternObetaUnique _leftPatternOcounter _leftPatternOimportEnvironment _leftPatternOmonos _leftPatternOnamesInScope _leftPatternOparentTree _leftPatternOpatternMatchWarnings)
(T_Name_vOut112 _operatorIself) = inv_Name_s113 _operatorX113 (T_Name_vIn112 )
(T_Pattern_vOut118 _rightPatternIbeta _rightPatternIbetaUnique _rightPatternIconstraints _rightPatternIcounter _rightPatternIelements _rightPatternIenvironment _rightPatternIinfoTree _rightPatternIpatVarNames _rightPatternIpatternMatchWarnings _rightPatternIself _rightPatternIunboundNames) = inv_Pattern_s119 _rightPatternX119 (T_Pattern_vIn118 _rightPatternObetaUnique _rightPatternOcounter _rightPatternOimportEnvironment _rightPatternOmonos _rightPatternOnamesInScope _rightPatternOparentTree _rightPatternOpatternMatchWarnings)
_lhsOnumberOfPatterns :: Int
_lhsOnumberOfPatterns = rule2444 ()
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2445 _leftPatternIenvironment _rightPatternIenvironment
_lhsObetas :: Tps
_lhsObetas = rule2446 _leftPatternIbeta _rightPatternIbeta
_lhsOname :: Name
_lhsOname = rule2447 _operatorIself
_constraints = rule2448 _leftPatternIconstraints _rightPatternIconstraints
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2449 _leftPatternIinfoTree _rightPatternIinfoTree
_lhsOelements :: [PatternElement]
_lhsOelements = rule2450 _leftPatternIelements _rightPatternIelements
_lhsOargcount :: Int
_lhsOargcount = rule2451 ()
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2452 _leftPatternIpatVarNames _rightPatternIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2453 _leftPatternIunboundNames _rightPatternIunboundNames
_self = rule2454 _leftPatternIself _operatorIself _rangeIself _rightPatternIself
_lhsOself :: LeftHandSide
_lhsOself = rule2455 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2456 _rightPatternIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2457 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2458 _rightPatternIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2459 _rightPatternIpatternMatchWarnings
_leftPatternObetaUnique = rule2460 _lhsIbetaUnique
_leftPatternOcounter = rule2461 _lhsIcounter
_leftPatternOimportEnvironment = rule2462 _lhsIimportEnvironment
_leftPatternOmonos = rule2463 _lhsImonos
_leftPatternOnamesInScope = rule2464 _lhsInamesInScope
_leftPatternOparentTree = rule2465 _lhsIparentTree
_leftPatternOpatternMatchWarnings = rule2466 _lhsIpatternMatchWarnings
_rightPatternObetaUnique = rule2467 _leftPatternIbetaUnique
_rightPatternOcounter = rule2468 _leftPatternIcounter
_rightPatternOimportEnvironment = rule2469 _lhsIimportEnvironment
_rightPatternOmonos = rule2470 _lhsImonos
_rightPatternOnamesInScope = rule2471 _lhsInamesInScope
_rightPatternOparentTree = rule2472 _lhsIparentTree
_rightPatternOpatternMatchWarnings = rule2473 _leftPatternIpatternMatchWarnings
__result_ = T_LeftHandSide_vOut82 _lhsOargcount _lhsObetaUnique _lhsObetas _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTrees _lhsOname _lhsOnumberOfPatterns _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_LeftHandSide_s83 v82
rule2444 = \ (_ :: ()) ->
2
rule2445 = \ ((_leftPatternIenvironment) :: PatternAssumptions) ((_rightPatternIenvironment) :: PatternAssumptions) ->
_leftPatternIenvironment `M.union` _rightPatternIenvironment
rule2446 = \ ((_leftPatternIbeta) :: Tp) ((_rightPatternIbeta) :: Tp) ->
[_leftPatternIbeta,_rightPatternIbeta]
rule2447 = \ ((_operatorIself) :: Name) ->
_operatorIself
rule2448 = \ ((_leftPatternIconstraints) :: ConstraintSet) ((_rightPatternIconstraints) :: ConstraintSet) ->
Node [ _leftPatternIconstraints
, _rightPatternIconstraints
]
rule2449 = \ ((_leftPatternIinfoTree) :: InfoTree) ((_rightPatternIinfoTree) :: InfoTree) ->
[_leftPatternIinfoTree, _rightPatternIinfoTree]
rule2450 = \ ((_leftPatternIelements) :: [PatternElement] ) ((_rightPatternIelements) :: [PatternElement] ) ->
_leftPatternIelements ++ _rightPatternIelements
rule2451 = \ (_ :: ()) ->
2
rule2452 = \ ((_leftPatternIpatVarNames) :: Names) ((_rightPatternIpatVarNames) :: Names) ->
_leftPatternIpatVarNames ++ _rightPatternIpatVarNames
rule2453 = \ ((_leftPatternIunboundNames) :: Names) ((_rightPatternIunboundNames) :: Names) ->
_leftPatternIunboundNames ++ _rightPatternIunboundNames
rule2454 = \ ((_leftPatternIself) :: Pattern) ((_operatorIself) :: Name) ((_rangeIself) :: Range) ((_rightPatternIself) :: Pattern) ->
LeftHandSide_Infix _rangeIself _leftPatternIself _operatorIself _rightPatternIself
rule2455 = \ _self ->
_self
rule2456 = \ ((_rightPatternIbetaUnique) :: Int) ->
_rightPatternIbetaUnique
rule2457 = \ _constraints ->
_constraints
rule2458 = \ ((_rightPatternIcounter) :: Int) ->
_rightPatternIcounter
rule2459 = \ ((_rightPatternIpatternMatchWarnings) :: [Warning]) ->
_rightPatternIpatternMatchWarnings
rule2460 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2461 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2462 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2463 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2464 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2465 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2466 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2467 = \ ((_leftPatternIbetaUnique) :: Int) ->
_leftPatternIbetaUnique
rule2468 = \ ((_leftPatternIcounter) :: Int) ->
_leftPatternIcounter
rule2469 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2470 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2471 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2472 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2473 = \ ((_leftPatternIpatternMatchWarnings) :: [Warning]) ->
_leftPatternIpatternMatchWarnings
sem_LeftHandSide_Parenthesized :: T_Range -> T_LeftHandSide -> T_Patterns -> T_LeftHandSide
sem_LeftHandSide_Parenthesized arg_range_ arg_lefthandside_ arg_patterns_ = T_LeftHandSide (return st83) where
st83 = let
v82 :: T_LeftHandSide_v82
v82 = \ (T_LeftHandSide_vIn82 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_lefthandsideX83 = Control.Monad.Identity.runIdentity (attach_T_LeftHandSide (arg_lefthandside_))
_patternsX122 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_patterns_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_LeftHandSide_vOut82 _lefthandsideIargcount _lefthandsideIbetaUnique _lefthandsideIbetas _lefthandsideIconstraints _lefthandsideIcounter _lefthandsideIelements _lefthandsideIenvironment _lefthandsideIinfoTrees _lefthandsideIname _lefthandsideInumberOfPatterns _lefthandsideIpatVarNames _lefthandsideIpatternMatchWarnings _lefthandsideIself _lefthandsideIunboundNames) = inv_LeftHandSide_s83 _lefthandsideX83 (T_LeftHandSide_vIn82 _lefthandsideObetaUnique _lefthandsideOcounter _lefthandsideOimportEnvironment _lefthandsideOmonos _lefthandsideOnamesInScope _lefthandsideOparentTree _lefthandsideOpatternMatchWarnings)
(T_Patterns_vOut121 _patternsIbetaUnique _patternsIbetas _patternsIconstraintslist _patternsIcounter _patternsIelementss _patternsIenvironment _patternsIinfoTrees _patternsInumberOfPatterns _patternsIpatVarNames _patternsIpatternMatchWarnings _patternsIself _patternsIunboundNames) = inv_Patterns_s122 _patternsX122 (T_Patterns_vIn121 _patternsObetaUnique _patternsOcounter _patternsOimportEnvironment _patternsOmonos _patternsOnamesInScope _patternsOparentTree _patternsOpatternMatchWarnings)
_lhsOnumberOfPatterns :: Int
_lhsOnumberOfPatterns = rule2474 _lefthandsideInumberOfPatterns _patternsInumberOfPatterns
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2475 _lefthandsideIenvironment _patternsIenvironment
_lhsObetas :: Tps
_lhsObetas = rule2476 _lefthandsideIbetas _patternsIbetas
_constraints = rule2477 _lefthandsideIconstraints _patternsIconstraintslist
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2478 _lefthandsideIinfoTrees _patternsIinfoTrees
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2479 _lefthandsideIpatVarNames _patternsIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2480 _lefthandsideIunboundNames _patternsIunboundNames
_self = rule2481 _lefthandsideIself _patternsIself _rangeIself
_lhsOself :: LeftHandSide
_lhsOself = rule2482 _self
_lhsOargcount :: Int
_lhsOargcount = rule2483 _lefthandsideIargcount
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2484 _patternsIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2485 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2486 _patternsIcounter
_lhsOelements :: [PatternElement]
_lhsOelements = rule2487 _lefthandsideIelements
_lhsOname :: Name
_lhsOname = rule2488 _lefthandsideIname
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2489 _patternsIpatternMatchWarnings
_lefthandsideObetaUnique = rule2490 _lhsIbetaUnique
_lefthandsideOcounter = rule2491 _lhsIcounter
_lefthandsideOimportEnvironment = rule2492 _lhsIimportEnvironment
_lefthandsideOmonos = rule2493 _lhsImonos
_lefthandsideOnamesInScope = rule2494 _lhsInamesInScope
_lefthandsideOparentTree = rule2495 _lhsIparentTree
_lefthandsideOpatternMatchWarnings = rule2496 _lhsIpatternMatchWarnings
_patternsObetaUnique = rule2497 _lefthandsideIbetaUnique
_patternsOcounter = rule2498 _lefthandsideIcounter
_patternsOimportEnvironment = rule2499 _lhsIimportEnvironment
_patternsOmonos = rule2500 _lhsImonos
_patternsOnamesInScope = rule2501 _lhsInamesInScope
_patternsOparentTree = rule2502 _lhsIparentTree
_patternsOpatternMatchWarnings = rule2503 _lefthandsideIpatternMatchWarnings
__result_ = T_LeftHandSide_vOut82 _lhsOargcount _lhsObetaUnique _lhsObetas _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTrees _lhsOname _lhsOnumberOfPatterns _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_LeftHandSide_s83 v82
rule2474 = \ ((_lefthandsideInumberOfPatterns) :: Int) ((_patternsInumberOfPatterns) :: Int) ->
_lefthandsideInumberOfPatterns + _patternsInumberOfPatterns
rule2475 = \ ((_lefthandsideIenvironment) :: PatternAssumptions) ((_patternsIenvironment) :: PatternAssumptions) ->
_lefthandsideIenvironment `M.union` _patternsIenvironment
rule2476 = \ ((_lefthandsideIbetas) :: Tps) ((_patternsIbetas) :: Tps) ->
_lefthandsideIbetas ++ _patternsIbetas
rule2477 = \ ((_lefthandsideIconstraints) :: ConstraintSet) ((_patternsIconstraintslist) :: ConstraintSets) ->
Node ( _lefthandsideIconstraints : _patternsIconstraintslist )
rule2478 = \ ((_lefthandsideIinfoTrees) :: InfoTrees) ((_patternsIinfoTrees) :: InfoTrees) ->
_lefthandsideIinfoTrees ++ _patternsIinfoTrees
rule2479 = \ ((_lefthandsideIpatVarNames) :: Names) ((_patternsIpatVarNames) :: Names) ->
_lefthandsideIpatVarNames ++ _patternsIpatVarNames
rule2480 = \ ((_lefthandsideIunboundNames) :: Names) ((_patternsIunboundNames) :: Names) ->
_lefthandsideIunboundNames ++ _patternsIunboundNames
rule2481 = \ ((_lefthandsideIself) :: LeftHandSide) ((_patternsIself) :: Patterns) ((_rangeIself) :: Range) ->
LeftHandSide_Parenthesized _rangeIself _lefthandsideIself _patternsIself
rule2482 = \ _self ->
_self
rule2483 = \ ((_lefthandsideIargcount) :: Int) ->
_lefthandsideIargcount
rule2484 = \ ((_patternsIbetaUnique) :: Int) ->
_patternsIbetaUnique
rule2485 = \ _constraints ->
_constraints
rule2486 = \ ((_patternsIcounter) :: Int) ->
_patternsIcounter
rule2487 = \ ((_lefthandsideIelements) :: [PatternElement] ) ->
_lefthandsideIelements
rule2488 = \ ((_lefthandsideIname) :: Name) ->
_lefthandsideIname
rule2489 = \ ((_patternsIpatternMatchWarnings) :: [Warning]) ->
_patternsIpatternMatchWarnings
rule2490 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2491 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2492 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2493 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2494 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2495 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2496 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2497 = \ ((_lefthandsideIbetaUnique) :: Int) ->
_lefthandsideIbetaUnique
rule2498 = \ ((_lefthandsideIcounter) :: Int) ->
_lefthandsideIcounter
rule2499 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2500 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2501 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2502 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2503 = \ ((_lefthandsideIpatternMatchWarnings) :: [Warning]) ->
_lefthandsideIpatternMatchWarnings
data Inh_Literal = Inh_Literal { }
data Syn_Literal = Syn_Literal { elements_Syn_Literal :: ( [PatternElement] ), literalType_Syn_Literal :: (Tp), self_Syn_Literal :: (Literal) }
wrap_Literal :: T_Literal -> Inh_Literal -> (Syn_Literal )
wrap_Literal (T_Literal act) (Inh_Literal ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Literal_vIn85
(T_Literal_vOut85 _lhsOelements _lhsOliteralType _lhsOself) <- return (inv_Literal_s86 sem arg)
return (Syn_Literal _lhsOelements _lhsOliteralType _lhsOself)
)
sem_Literal :: Literal -> T_Literal
sem_Literal ( Literal_Int range_ value_ ) = sem_Literal_Int ( sem_Range range_ ) value_
sem_Literal ( Literal_Char range_ value_ ) = sem_Literal_Char ( sem_Range range_ ) value_
sem_Literal ( Literal_Float range_ value_ ) = sem_Literal_Float ( sem_Range range_ ) value_
sem_Literal ( Literal_String range_ value_ ) = sem_Literal_String ( sem_Range range_ ) value_
newtype T_Literal = T_Literal {
attach_T_Literal :: Identity (T_Literal_s86 )
}
newtype T_Literal_s86 = C_Literal_s86 {
inv_Literal_s86 :: (T_Literal_v85 )
}
data T_Literal_s87 = C_Literal_s87
type T_Literal_v85 = (T_Literal_vIn85 ) -> (T_Literal_vOut85 )
data T_Literal_vIn85 = T_Literal_vIn85
data T_Literal_vOut85 = T_Literal_vOut85 ( [PatternElement] ) (Tp) (Literal)
sem_Literal_Int :: T_Range -> (String) -> T_Literal
sem_Literal_Int arg_range_ arg_value_ = T_Literal (return st86) where
st86 = let
v85 :: T_Literal_v85
v85 = \ (T_Literal_vIn85 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsOliteralType :: Tp
_lhsOliteralType = rule2504 ()
_lhsOelements :: [PatternElement]
_lhsOelements = rule2505 arg_value_
_self = rule2506 _rangeIself arg_value_
_lhsOself :: Literal
_lhsOself = rule2507 _self
__result_ = T_Literal_vOut85 _lhsOelements _lhsOliteralType _lhsOself
in __result_ )
in C_Literal_s86 v85
rule2504 = \ (_ :: ()) ->
intType
rule2505 = \ value_ ->
[InfiniteElement value_]
rule2506 = \ ((_rangeIself) :: Range) value_ ->
Literal_Int _rangeIself value_
rule2507 = \ _self ->
_self
sem_Literal_Char :: T_Range -> (String) -> T_Literal
sem_Literal_Char arg_range_ arg_value_ = T_Literal (return st86) where
st86 = let
v85 :: T_Literal_v85
v85 = \ (T_Literal_vIn85 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsOliteralType :: Tp
_lhsOliteralType = rule2508 ()
_lhsOelements :: [PatternElement]
_lhsOelements = rule2509 arg_value_
_self = rule2510 _rangeIself arg_value_
_lhsOself :: Literal
_lhsOself = rule2511 _self
__result_ = T_Literal_vOut85 _lhsOelements _lhsOliteralType _lhsOself
in __result_ )
in C_Literal_s86 v85
rule2508 = \ (_ :: ()) ->
charType
rule2509 = \ value_ ->
[InfiniteElement value_]
rule2510 = \ ((_rangeIself) :: Range) value_ ->
Literal_Char _rangeIself value_
rule2511 = \ _self ->
_self
sem_Literal_Float :: T_Range -> (String) -> T_Literal
sem_Literal_Float arg_range_ arg_value_ = T_Literal (return st86) where
st86 = let
v85 :: T_Literal_v85
v85 = \ (T_Literal_vIn85 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsOliteralType :: Tp
_lhsOliteralType = rule2512 ()
_lhsOelements :: [PatternElement]
_lhsOelements = rule2513 arg_value_
_self = rule2514 _rangeIself arg_value_
_lhsOself :: Literal
_lhsOself = rule2515 _self
__result_ = T_Literal_vOut85 _lhsOelements _lhsOliteralType _lhsOself
in __result_ )
in C_Literal_s86 v85
rule2512 = \ (_ :: ()) ->
floatType
rule2513 = \ value_ ->
[InfiniteElement value_]
rule2514 = \ ((_rangeIself) :: Range) value_ ->
Literal_Float _rangeIself value_
rule2515 = \ _self ->
_self
sem_Literal_String :: T_Range -> (String) -> T_Literal
sem_Literal_String arg_range_ arg_value_ = T_Literal (return st86) where
st86 = let
v85 :: T_Literal_v85
v85 = \ (T_Literal_vIn85 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsOliteralType :: Tp
_lhsOliteralType = rule2516 ()
_lhsOelements :: [PatternElement]
_lhsOelements = rule2517 arg_value_
_self = rule2518 _rangeIself arg_value_
_lhsOself :: Literal
_lhsOself = rule2519 _self
__result_ = T_Literal_vOut85 _lhsOelements _lhsOliteralType _lhsOself
in __result_ )
in C_Literal_s86 v85
rule2516 = \ (_ :: ()) ->
stringType
rule2517 = \ value_ ->
stringPat value_
rule2518 = \ ((_rangeIself) :: Range) value_ ->
Literal_String _rangeIself value_
rule2519 = \ _self ->
_self
data Inh_MaybeDeclarations = Inh_MaybeDeclarations { allPatterns_Inh_MaybeDeclarations :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_MaybeDeclarations :: (M.Map NameWithRange TpScheme), assumptions_Inh_MaybeDeclarations :: (Assumptions), availablePredicates_Inh_MaybeDeclarations :: (Predicates), betaUnique_Inh_MaybeDeclarations :: (Int), classEnvironment_Inh_MaybeDeclarations :: (ClassEnvironment), collectErrors_Inh_MaybeDeclarations :: (TypeErrors), collectWarnings_Inh_MaybeDeclarations :: (Warnings), constraints_Inh_MaybeDeclarations :: (ConstraintSet), counter_Inh_MaybeDeclarations :: (Int), currentChunk_Inh_MaybeDeclarations :: (Int), dictionaryEnvironment_Inh_MaybeDeclarations :: (DictionaryEnvironment), importEnvironment_Inh_MaybeDeclarations :: (ImportEnvironment), matchIO_Inh_MaybeDeclarations :: (IO ()), monos_Inh_MaybeDeclarations :: (Monos), namesInScope_Inh_MaybeDeclarations :: (Names), orderedTypeSynonyms_Inh_MaybeDeclarations :: (OrderedTypeSynonyms), parentTree_Inh_MaybeDeclarations :: (InfoTree), patternMatchWarnings_Inh_MaybeDeclarations :: ([Warning]), substitution_Inh_MaybeDeclarations :: (FixpointSubstitution), typeschemeMap_Inh_MaybeDeclarations :: (M.Map Int (Scheme Predicates)), unboundNames_Inh_MaybeDeclarations :: (Names), uniqueChunk_Inh_MaybeDeclarations :: (Int) }
data Syn_MaybeDeclarations = Syn_MaybeDeclarations { assumptions_Syn_MaybeDeclarations :: (Assumptions), betaUnique_Syn_MaybeDeclarations :: (Int), collectErrors_Syn_MaybeDeclarations :: (TypeErrors), collectInstances_Syn_MaybeDeclarations :: ([(Name, Instance)]), collectWarnings_Syn_MaybeDeclarations :: (Warnings), constraints_Syn_MaybeDeclarations :: (ConstraintSet), counter_Syn_MaybeDeclarations :: (Int), dictionaryEnvironment_Syn_MaybeDeclarations :: (DictionaryEnvironment), infoTrees_Syn_MaybeDeclarations :: (InfoTrees), localTypes_Syn_MaybeDeclarations :: (M.Map NameWithRange TpScheme), matchIO_Syn_MaybeDeclarations :: (IO ()), namesInScope_Syn_MaybeDeclarations :: (Names), patternMatchWarnings_Syn_MaybeDeclarations :: ([Warning]), self_Syn_MaybeDeclarations :: (MaybeDeclarations), unboundNames_Syn_MaybeDeclarations :: (Names), uniqueChunk_Syn_MaybeDeclarations :: (Int) }
wrap_MaybeDeclarations :: T_MaybeDeclarations -> Inh_MaybeDeclarations -> (Syn_MaybeDeclarations )
wrap_MaybeDeclarations (T_MaybeDeclarations act) (Inh_MaybeDeclarations _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_MaybeDeclarations_vIn88 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk
(T_MaybeDeclarations_vOut88 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOlocalTypes _lhsOmatchIO _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk) <- return (inv_MaybeDeclarations_s89 sem arg)
return (Syn_MaybeDeclarations _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOlocalTypes _lhsOmatchIO _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk)
)
sem_MaybeDeclarations :: MaybeDeclarations -> T_MaybeDeclarations
sem_MaybeDeclarations ( MaybeDeclarations_Nothing ) = sem_MaybeDeclarations_Nothing
sem_MaybeDeclarations ( MaybeDeclarations_Just declarations_ ) = sem_MaybeDeclarations_Just ( sem_Declarations declarations_ )
newtype T_MaybeDeclarations = T_MaybeDeclarations {
attach_T_MaybeDeclarations :: Identity (T_MaybeDeclarations_s89 )
}
newtype T_MaybeDeclarations_s89 = C_MaybeDeclarations_s89 {
inv_MaybeDeclarations_s89 :: (T_MaybeDeclarations_v88 )
}
data T_MaybeDeclarations_s90 = C_MaybeDeclarations_s90
type T_MaybeDeclarations_v88 = (T_MaybeDeclarations_vIn88 ) -> (T_MaybeDeclarations_vOut88 )
data T_MaybeDeclarations_vIn88 = T_MaybeDeclarations_vIn88 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Assumptions) (Predicates) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (ConstraintSet) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Names) (Int)
data T_MaybeDeclarations_vOut88 = T_MaybeDeclarations_vOut88 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) (InfoTrees) (M.Map NameWithRange TpScheme) (IO ()) (Names) ([Warning]) (MaybeDeclarations) (Names) (Int)
sem_MaybeDeclarations_Nothing :: T_MaybeDeclarations
sem_MaybeDeclarations_Nothing = T_MaybeDeclarations (return st89) where
st89 = let
v88 :: T_MaybeDeclarations_v88
v88 = \ (T_MaybeDeclarations_vIn88 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk) -> ( let
_lhsOlocalTypes :: M.Map NameWithRange TpScheme
_lhsOlocalTypes = rule2520 ()
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2521 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2522 ()
_self = rule2523 ()
_lhsOself :: MaybeDeclarations
_lhsOself = rule2524 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2525 _lhsIassumptions
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2526 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2527 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2528 _lhsIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2529 _lhsIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule2530 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2531 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2532 _lhsImatchIO
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule2533 _lhsInamesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2534 _lhsIpatternMatchWarnings
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2535 _lhsIunboundNames
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2536 _lhsIuniqueChunk
__result_ = T_MaybeDeclarations_vOut88 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOlocalTypes _lhsOmatchIO _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_MaybeDeclarations_s89 v88
rule2520 = \ (_ :: ()) ->
M.empty
rule2521 = \ (_ :: ()) ->
[]
rule2522 = \ (_ :: ()) ->
[]
rule2523 = \ (_ :: ()) ->
MaybeDeclarations_Nothing
rule2524 = \ _self ->
_self
rule2525 = \ ((_lhsIassumptions) :: Assumptions) ->
_lhsIassumptions
rule2526 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2527 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2528 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2529 = \ ((_lhsIconstraints) :: ConstraintSet) ->
_lhsIconstraints
rule2530 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2531 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2532 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2533 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2534 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2535 = \ ((_lhsIunboundNames) :: Names) ->
_lhsIunboundNames
rule2536 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_MaybeDeclarations_Just :: T_Declarations -> T_MaybeDeclarations
sem_MaybeDeclarations_Just arg_declarations_ = T_MaybeDeclarations (return st89) where
st89 = let
v88 :: T_MaybeDeclarations_v88
v88 = \ (T_MaybeDeclarations_vIn88 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk) -> ( let
_declarationsX32 = Control.Monad.Identity.runIdentity (attach_T_Declarations (arg_declarations_))
(T_Declarations_vOut31 _declarationsIbetaUnique _declarationsIbindingGroups _declarationsIcollectErrors _declarationsIcollectInstances _declarationsIcollectWarnings _declarationsIcounter _declarationsIdeclVarNames _declarationsIdictionaryEnvironment _declarationsIinfoTrees _declarationsImatchIO _declarationsIpatternMatchWarnings _declarationsIrestrictedNames _declarationsIself _declarationsIsimplePatNames _declarationsItypeSignatures _declarationsIunboundNames _declarationsIuniqueChunk) = inv_Declarations_s32 _declarationsX32 (T_Declarations_vIn31 _declarationsOallPatterns _declarationsOallTypeSchemes _declarationsOavailablePredicates _declarationsObetaUnique _declarationsObindingGroups _declarationsOclassEnvironment _declarationsOcollectErrors _declarationsOcollectWarnings _declarationsOcounter _declarationsOcurrentChunk _declarationsOdictionaryEnvironment _declarationsOimportEnvironment _declarationsOinheritedBDG _declarationsOmatchIO _declarationsOmonos _declarationsOnamesInScope _declarationsOorderedTypeSynonyms _declarationsOparentTree _declarationsOpatternMatchWarnings _declarationsOsubstitution _declarationsOtypeSignatures _declarationsOtypeschemeMap _declarationsOuniqueChunk)
_declarationsObindingGroups = rule2537 ()
_lhsOassumptions :: Assumptions
_lhsOconstraints :: ConstraintSet
_lhsObetaUnique :: Int
(_lhsOassumptions,_lhsOconstraints,_inheritedBDG,_chunkNr,_lhsObetaUnique,_implicitsFM) = rule2538 _declarationsIbetaUnique _declarationsIbindingGroups _declarationsItypeSignatures _declarationsIuniqueChunk _lhsIassumptions _lhsIconstraints _lhsIcurrentChunk _lhsImonos
_inferredTypes = rule2539 _implicitsFM _lhsItypeschemeMap
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2540 _declarationsIcollectWarnings _declarationsIsimplePatNames _inferredTypes
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2541 _declarationsIcollectErrors _declarationsIrestrictedNames _inferredTypes
_lhsOlocalTypes :: M.Map NameWithRange TpScheme
_lhsOlocalTypes = rule2542 _declarationsIbindingGroups _declarationsItypeSignatures _inferredTypes
_declarationsOtypeSignatures = rule2543 ()
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2544 _chunkNr
_declInfo = rule2545 _declarationsIself _lhsImonos
_theNode = rule2546 _declInfo _declarationsIinfoTrees _lhsIparentTree
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2547 _theNode
_declarationsOparentTree = rule2548 _theNode
(_collectTypeConstructors,_collectValueConstructors,_collectTypeSynonyms,_collectConstructorEnv,_derivedFunctions,_operatorFixities) = rule2549 ()
(_namesInScope,_unboundNames,_scopeInfo) = rule2550 _declarationsIdeclVarNames _declarationsIunboundNames _lhsInamesInScope _lhsIunboundNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2551 _unboundNames
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2552 _declarationsIcollectInstances
_self = rule2553 _declarationsIself
_lhsOself :: MaybeDeclarations
_lhsOself = rule2554 _self
_lhsOcounter :: Int
_lhsOcounter = rule2555 _declarationsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2556 _declarationsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2557 _declarationsImatchIO
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule2558 _namesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2559 _declarationsIpatternMatchWarnings
_declarationsOallPatterns = rule2560 _lhsIallPatterns
_declarationsOallTypeSchemes = rule2561 _lhsIallTypeSchemes
_declarationsOavailablePredicates = rule2562 _lhsIavailablePredicates
_declarationsObetaUnique = rule2563 _lhsIbetaUnique
_declarationsOclassEnvironment = rule2564 _lhsIclassEnvironment
_declarationsOcollectErrors = rule2565 _lhsIcollectErrors
_declarationsOcollectWarnings = rule2566 _lhsIcollectWarnings
_declarationsOcounter = rule2567 _lhsIcounter
_declarationsOcurrentChunk = rule2568 _lhsIcurrentChunk
_declarationsOdictionaryEnvironment = rule2569 _lhsIdictionaryEnvironment
_declarationsOimportEnvironment = rule2570 _lhsIimportEnvironment
_declarationsOinheritedBDG = rule2571 _inheritedBDG
_declarationsOmatchIO = rule2572 _lhsImatchIO
_declarationsOmonos = rule2573 _lhsImonos
_declarationsOnamesInScope = rule2574 _namesInScope
_declarationsOorderedTypeSynonyms = rule2575 _lhsIorderedTypeSynonyms
_declarationsOpatternMatchWarnings = rule2576 _lhsIpatternMatchWarnings
_declarationsOsubstitution = rule2577 _lhsIsubstitution
_declarationsOtypeschemeMap = rule2578 _lhsItypeschemeMap
_declarationsOuniqueChunk = rule2579 _lhsIuniqueChunk
__result_ = T_MaybeDeclarations_vOut88 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOlocalTypes _lhsOmatchIO _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_MaybeDeclarations_s89 v88
rule2537 = \ (_ :: ()) ->
[]
rule2538 = \ ((_declarationsIbetaUnique) :: Int) ((_declarationsIbindingGroups) :: BindingGroups) ((_declarationsItypeSignatures) :: TypeEnvironment) ((_declarationsIuniqueChunk) :: Int) ((_lhsIassumptions) :: Assumptions) ((_lhsIconstraints) :: ConstraintSet) ((_lhsIcurrentChunk) :: Int) ((_lhsImonos) :: Monos) ->
let inputBDG = (False, _lhsIcurrentChunk, _declarationsIuniqueChunk, _lhsImonos, _declarationsItypeSignatures, mybdggroup, _declarationsIbetaUnique)
mybdggroup = Just (_lhsIassumptions, [_lhsIconstraints])
in performBindingGroup inputBDG _declarationsIbindingGroups
rule2539 = \ _implicitsFM ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
findInferredTypes _lhsItypeschemeMap _implicitsFM
rule2540 = \ ((_declarationsIcollectWarnings) :: Warnings) ((_declarationsIsimplePatNames) :: Names) _inferredTypes ->
missingTypeSignature False _declarationsIsimplePatNames _inferredTypes
++ _declarationsIcollectWarnings
rule2541 = \ ((_declarationsIcollectErrors) :: TypeErrors) ((_declarationsIrestrictedNames) :: Names) _inferredTypes ->
restrictedNameErrors _inferredTypes _declarationsIrestrictedNames
++ _declarationsIcollectErrors
rule2542 = \ ((_declarationsIbindingGroups) :: BindingGroups) ((_declarationsItypeSignatures) :: TypeEnvironment) _inferredTypes ->
makeLocalTypeEnv (_declarationsItypeSignatures `M.union` _inferredTypes) _declarationsIbindingGroups
rule2543 = \ (_ :: ()) ->
M.empty
rule2544 = \ _chunkNr ->
_chunkNr
rule2545 = \ ((_declarationsIself) :: Declarations) ((_lhsImonos) :: Monos) ->
LocalInfo { self = UHA_Decls _declarationsIself
, assignedType = Nothing
, monos = _lhsImonos
}
rule2546 = \ _declInfo ((_declarationsIinfoTrees) :: InfoTrees) ((_lhsIparentTree) :: InfoTree) ->
node _lhsIparentTree _declInfo _declarationsIinfoTrees
rule2547 = \ _theNode ->
[_theNode]
rule2548 = \ _theNode ->
_theNode
rule2549 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "toplevel MaybeDeclaration"
rule2550 = \ ((_declarationsIdeclVarNames) :: Names) ((_declarationsIunboundNames) :: Names) ((_lhsInamesInScope) :: Names) ((_lhsIunboundNames) :: Names) ->
changeOfScope _declarationsIdeclVarNames (_declarationsIunboundNames ++ _lhsIunboundNames) _lhsInamesInScope
rule2551 = \ _unboundNames ->
_unboundNames
rule2552 = \ ((_declarationsIcollectInstances) :: [(Name, Instance)]) ->
_declarationsIcollectInstances
rule2553 = \ ((_declarationsIself) :: Declarations) ->
MaybeDeclarations_Just _declarationsIself
rule2554 = \ _self ->
_self
rule2555 = \ ((_declarationsIcounter) :: Int) ->
_declarationsIcounter
rule2556 = \ ((_declarationsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_declarationsIdictionaryEnvironment
rule2557 = \ ((_declarationsImatchIO) :: IO ()) ->
_declarationsImatchIO
rule2558 = \ _namesInScope ->
_namesInScope
rule2559 = \ ((_declarationsIpatternMatchWarnings) :: [Warning]) ->
_declarationsIpatternMatchWarnings
rule2560 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule2561 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule2562 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule2563 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2564 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule2565 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2566 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2567 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2568 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule2569 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2570 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2571 = \ _inheritedBDG ->
_inheritedBDG
rule2572 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2573 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2574 = \ _namesInScope ->
_namesInScope
rule2575 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule2576 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2577 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2578 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2579 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
data Inh_MaybeExports = Inh_MaybeExports { }
data Syn_MaybeExports = Syn_MaybeExports { self_Syn_MaybeExports :: (MaybeExports) }
wrap_MaybeExports :: T_MaybeExports -> Inh_MaybeExports -> (Syn_MaybeExports )
wrap_MaybeExports (T_MaybeExports act) (Inh_MaybeExports ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_MaybeExports_vIn91
(T_MaybeExports_vOut91 _lhsOself) <- return (inv_MaybeExports_s92 sem arg)
return (Syn_MaybeExports _lhsOself)
)
sem_MaybeExports :: MaybeExports -> T_MaybeExports
sem_MaybeExports ( MaybeExports_Nothing ) = sem_MaybeExports_Nothing
sem_MaybeExports ( MaybeExports_Just exports_ ) = sem_MaybeExports_Just ( sem_Exports exports_ )
newtype T_MaybeExports = T_MaybeExports {
attach_T_MaybeExports :: Identity (T_MaybeExports_s92 )
}
newtype T_MaybeExports_s92 = C_MaybeExports_s92 {
inv_MaybeExports_s92 :: (T_MaybeExports_v91 )
}
data T_MaybeExports_s93 = C_MaybeExports_s93
type T_MaybeExports_v91 = (T_MaybeExports_vIn91 ) -> (T_MaybeExports_vOut91 )
data T_MaybeExports_vIn91 = T_MaybeExports_vIn91
data T_MaybeExports_vOut91 = T_MaybeExports_vOut91 (MaybeExports)
sem_MaybeExports_Nothing :: T_MaybeExports
sem_MaybeExports_Nothing = T_MaybeExports (return st92) where
st92 = let
v91 :: T_MaybeExports_v91
v91 = \ (T_MaybeExports_vIn91 ) -> ( let
_self = rule2580 ()
_lhsOself :: MaybeExports
_lhsOself = rule2581 _self
__result_ = T_MaybeExports_vOut91 _lhsOself
in __result_ )
in C_MaybeExports_s92 v91
rule2580 = \ (_ :: ()) ->
MaybeExports_Nothing
rule2581 = \ _self ->
_self
sem_MaybeExports_Just :: T_Exports -> T_MaybeExports
sem_MaybeExports_Just arg_exports_ = T_MaybeExports (return st92) where
st92 = let
v91 :: T_MaybeExports_v91
v91 = \ (T_MaybeExports_vIn91 ) -> ( let
_exportsX38 = Control.Monad.Identity.runIdentity (attach_T_Exports (arg_exports_))
(T_Exports_vOut37 _exportsIself) = inv_Exports_s38 _exportsX38 (T_Exports_vIn37 )
_self = rule2582 _exportsIself
_lhsOself :: MaybeExports
_lhsOself = rule2583 _self
__result_ = T_MaybeExports_vOut91 _lhsOself
in __result_ )
in C_MaybeExports_s92 v91
rule2582 = \ ((_exportsIself) :: Exports) ->
MaybeExports_Just _exportsIself
rule2583 = \ _self ->
_self
data Inh_MaybeExpression = Inh_MaybeExpression { allPatterns_Inh_MaybeExpression :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_MaybeExpression :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_MaybeExpression :: (Predicates), betaUnique_Inh_MaybeExpression :: (Int), classEnvironment_Inh_MaybeExpression :: (ClassEnvironment), collectErrors_Inh_MaybeExpression :: (TypeErrors), collectWarnings_Inh_MaybeExpression :: (Warnings), counter_Inh_MaybeExpression :: (Int), currentChunk_Inh_MaybeExpression :: (Int), dictionaryEnvironment_Inh_MaybeExpression :: (DictionaryEnvironment), importEnvironment_Inh_MaybeExpression :: (ImportEnvironment), matchIO_Inh_MaybeExpression :: (IO ()), monos_Inh_MaybeExpression :: (Monos), namesInScope_Inh_MaybeExpression :: (Names), orderedTypeSynonyms_Inh_MaybeExpression :: (OrderedTypeSynonyms), parentTree_Inh_MaybeExpression :: (InfoTree), patternMatchWarnings_Inh_MaybeExpression :: ([Warning]), substitution_Inh_MaybeExpression :: (FixpointSubstitution), tryPatterns_Inh_MaybeExpression :: ([(MaybeExpression, [String])]), typeschemeMap_Inh_MaybeExpression :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_MaybeExpression :: (Int), uniqueSecondRound_Inh_MaybeExpression :: (Int) }
data Syn_MaybeExpression = Syn_MaybeExpression { assumptions_Syn_MaybeExpression :: (Assumptions), beta_Syn_MaybeExpression :: (Tp), betaUnique_Syn_MaybeExpression :: (Int), collectErrors_Syn_MaybeExpression :: (TypeErrors), collectInstances_Syn_MaybeExpression :: ([(Name, Instance)]), collectWarnings_Syn_MaybeExpression :: (Warnings), constraints_Syn_MaybeExpression :: (ConstraintSet), counter_Syn_MaybeExpression :: (Int), dictionaryEnvironment_Syn_MaybeExpression :: (DictionaryEnvironment), infoTrees_Syn_MaybeExpression :: (InfoTrees), matchIO_Syn_MaybeExpression :: (IO ()), matches_Syn_MaybeExpression :: ([Maybe MetaVariableTable]), patternMatchWarnings_Syn_MaybeExpression :: ([Warning]), section_Syn_MaybeExpression :: (Bool), self_Syn_MaybeExpression :: (MaybeExpression), unboundNames_Syn_MaybeExpression :: (Names), uniqueChunk_Syn_MaybeExpression :: (Int), uniqueSecondRound_Syn_MaybeExpression :: (Int) }
wrap_MaybeExpression :: T_MaybeExpression -> Inh_MaybeExpression -> (Syn_MaybeExpression )
wrap_MaybeExpression (T_MaybeExpression act) (Inh_MaybeExpression _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_MaybeExpression_vIn94 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound
(T_MaybeExpression_vOut94 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOsection _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound) <- return (inv_MaybeExpression_s95 sem arg)
return (Syn_MaybeExpression _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOsection _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound)
)
sem_MaybeExpression :: MaybeExpression -> T_MaybeExpression
sem_MaybeExpression ( MaybeExpression_Nothing ) = sem_MaybeExpression_Nothing
sem_MaybeExpression ( MaybeExpression_Just expression_ ) = sem_MaybeExpression_Just ( sem_Expression expression_ )
newtype T_MaybeExpression = T_MaybeExpression {
attach_T_MaybeExpression :: Identity (T_MaybeExpression_s95 )
}
newtype T_MaybeExpression_s95 = C_MaybeExpression_s95 {
inv_MaybeExpression_s95 :: (T_MaybeExpression_v94 )
}
data T_MaybeExpression_s96 = C_MaybeExpression_s96
type T_MaybeExpression_v94 = (T_MaybeExpression_vIn94 ) -> (T_MaybeExpression_vOut94 )
data T_MaybeExpression_vIn94 = T_MaybeExpression_vIn94 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) ([(MaybeExpression, [String])]) (M.Map Int (Scheme Predicates)) (Int) (Int)
data T_MaybeExpression_vOut94 = T_MaybeExpression_vOut94 (Assumptions) (Tp) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) (InfoTrees) (IO ()) ([Maybe MetaVariableTable]) ([Warning]) (Bool) (MaybeExpression) (Names) (Int) (Int)
sem_MaybeExpression_Nothing :: T_MaybeExpression
sem_MaybeExpression_Nothing = T_MaybeExpression (return st95) where
st95 = let
v94 :: T_MaybeExpression_v94
v94 = \ (T_MaybeExpression_vIn94 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_lhsOsection :: Bool
_lhsOsection = rule2584 ()
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2585 _lhsIbetaUnique
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2586 ()
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2587 ()
_beta = rule2588 _lhsIbetaUnique
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2589 ()
_lhsOmatches :: [Maybe MetaVariableTable]
((),_lhsOmatches,_,_,_,_) = rule2590 _lhsItryPatterns
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2591 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2592 ()
_self = rule2593 ()
_lhsOself :: MaybeExpression
_lhsOself = rule2594 _self
_lhsObeta :: Tp
_lhsObeta = rule2595 _beta
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2596 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2597 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule2598 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2599 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2600 _lhsImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2601 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2602 _lhsIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule2603 _lhsIuniqueSecondRound
__result_ = T_MaybeExpression_vOut94 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOsection _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_MaybeExpression_s95 v94
rule2584 = \ (_ :: ()) ->
True
rule2585 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule2586 = \ (_ :: ()) ->
noAssumptions
rule2587 = \ (_ :: ()) ->
emptyTree
rule2588 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule2589 = \ (_ :: ()) ->
[]
rule2590 = \ ((_lhsItryPatterns) :: [(MaybeExpression, [String])]) ->
match0' match_MaybeExpression_Nothing _lhsItryPatterns [] []
rule2591 = \ (_ :: ()) ->
[]
rule2592 = \ (_ :: ()) ->
[]
rule2593 = \ (_ :: ()) ->
MaybeExpression_Nothing
rule2594 = \ _self ->
_self
rule2595 = \ _beta ->
_beta
rule2596 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2597 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2598 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2599 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2600 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2601 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2602 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule2603 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_MaybeExpression_Just :: T_Expression -> T_MaybeExpression
sem_MaybeExpression_Just arg_expression_ = T_MaybeExpression (return st95) where
st95 = let
v94 :: T_MaybeExpression_v94
v94 = \ (T_MaybeExpression_vIn94 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItryPatterns _lhsItypeschemeMap _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_lhsOsection :: Bool
_lhsOsection = rule2604 ()
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule2605 _expressionIinfoTree
_lhsOmatches :: [Maybe MetaVariableTable]
(_expressionOtryPatterns,_lhsOmatches,_,_,_,_) = rule2606 _expressionImatches _lhsItryPatterns
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule2607 _expressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2608 _expressionIunboundNames
_self = rule2609 _expressionIself
_lhsOself :: MaybeExpression
_lhsOself = rule2610 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2611 _expressionIassumptions
_lhsObeta :: Tp
_lhsObeta = rule2612 _expressionIbeta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2613 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule2614 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule2615 _expressionIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2616 _expressionIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule2617 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2618 _expressionIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule2619 _expressionImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2620 _expressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule2621 _expressionIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule2622 _expressionIuniqueSecondRound
_expressionOallPatterns = rule2623 _lhsIallPatterns
_expressionOallTypeSchemes = rule2624 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule2625 _lhsIavailablePredicates
_expressionObetaUnique = rule2626 _lhsIbetaUnique
_expressionOclassEnvironment = rule2627 _lhsIclassEnvironment
_expressionOcollectErrors = rule2628 _lhsIcollectErrors
_expressionOcollectWarnings = rule2629 _lhsIcollectWarnings
_expressionOcounter = rule2630 _lhsIcounter
_expressionOcurrentChunk = rule2631 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule2632 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule2633 _lhsIimportEnvironment
_expressionOmatchIO = rule2634 _lhsImatchIO
_expressionOmonos = rule2635 _lhsImonos
_expressionOnamesInScope = rule2636 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule2637 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule2638 _lhsIparentTree
_expressionOpatternMatchWarnings = rule2639 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule2640 _lhsIsubstitution
_expressionOtypeschemeMap = rule2641 _lhsItypeschemeMap
_expressionOuniqueChunk = rule2642 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule2643 _lhsIuniqueSecondRound
__result_ = T_MaybeExpression_vOut94 _lhsOassumptions _lhsObeta _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmatches _lhsOpatternMatchWarnings _lhsOsection _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_MaybeExpression_s95 v94
rule2604 = \ (_ :: ()) ->
False
rule2605 = \ ((_expressionIinfoTree) :: InfoTree) ->
[_expressionIinfoTree]
rule2606 = \ ((_expressionImatches) :: [Maybe MetaVariableTable]) ((_lhsItryPatterns) :: [(MaybeExpression, [String])]) ->
match1' match_MaybeExpression_Just _lhsItryPatterns [] [_expressionImatches]
rule2607 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule2608 = \ ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames
rule2609 = \ ((_expressionIself) :: Expression) ->
MaybeExpression_Just _expressionIself
rule2610 = \ _self ->
_self
rule2611 = \ ((_expressionIassumptions) :: Assumptions) ->
_expressionIassumptions
rule2612 = \ ((_expressionIbeta) :: Tp) ->
_expressionIbeta
rule2613 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule2614 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule2615 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule2616 = \ ((_expressionIconstraints) :: ConstraintSet) ->
_expressionIconstraints
rule2617 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule2618 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule2619 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule2620 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule2621 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule2622 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule2623 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule2624 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule2625 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule2626 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2627 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule2628 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule2629 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule2630 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2631 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule2632 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule2633 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2634 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule2635 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2636 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2637 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule2638 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2639 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2640 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule2641 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule2642 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule2643 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
data Inh_MaybeImportSpecification = Inh_MaybeImportSpecification { }
data Syn_MaybeImportSpecification = Syn_MaybeImportSpecification { self_Syn_MaybeImportSpecification :: (MaybeImportSpecification) }
wrap_MaybeImportSpecification :: T_MaybeImportSpecification -> Inh_MaybeImportSpecification -> (Syn_MaybeImportSpecification )
wrap_MaybeImportSpecification (T_MaybeImportSpecification act) (Inh_MaybeImportSpecification ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_MaybeImportSpecification_vIn97
(T_MaybeImportSpecification_vOut97 _lhsOself) <- return (inv_MaybeImportSpecification_s98 sem arg)
return (Syn_MaybeImportSpecification _lhsOself)
)
sem_MaybeImportSpecification :: MaybeImportSpecification -> T_MaybeImportSpecification
sem_MaybeImportSpecification ( MaybeImportSpecification_Nothing ) = sem_MaybeImportSpecification_Nothing
sem_MaybeImportSpecification ( MaybeImportSpecification_Just importspecification_ ) = sem_MaybeImportSpecification_Just ( sem_ImportSpecification importspecification_ )
newtype T_MaybeImportSpecification = T_MaybeImportSpecification {
attach_T_MaybeImportSpecification :: Identity (T_MaybeImportSpecification_s98 )
}
newtype T_MaybeImportSpecification_s98 = C_MaybeImportSpecification_s98 {
inv_MaybeImportSpecification_s98 :: (T_MaybeImportSpecification_v97 )
}
data T_MaybeImportSpecification_s99 = C_MaybeImportSpecification_s99
type T_MaybeImportSpecification_v97 = (T_MaybeImportSpecification_vIn97 ) -> (T_MaybeImportSpecification_vOut97 )
data T_MaybeImportSpecification_vIn97 = T_MaybeImportSpecification_vIn97
data T_MaybeImportSpecification_vOut97 = T_MaybeImportSpecification_vOut97 (MaybeImportSpecification)
sem_MaybeImportSpecification_Nothing :: T_MaybeImportSpecification
sem_MaybeImportSpecification_Nothing = T_MaybeImportSpecification (return st98) where
st98 = let
v97 :: T_MaybeImportSpecification_v97
v97 = \ (T_MaybeImportSpecification_vIn97 ) -> ( let
_self = rule2644 ()
_lhsOself :: MaybeImportSpecification
_lhsOself = rule2645 _self
__result_ = T_MaybeImportSpecification_vOut97 _lhsOself
in __result_ )
in C_MaybeImportSpecification_s98 v97
rule2644 = \ (_ :: ()) ->
MaybeImportSpecification_Nothing
rule2645 = \ _self ->
_self
sem_MaybeImportSpecification_Just :: T_ImportSpecification -> T_MaybeImportSpecification
sem_MaybeImportSpecification_Just arg_importspecification_ = T_MaybeImportSpecification (return st98) where
st98 = let
v97 :: T_MaybeImportSpecification_v97
v97 = \ (T_MaybeImportSpecification_vIn97 ) -> ( let
_importspecificationX77 = Control.Monad.Identity.runIdentity (attach_T_ImportSpecification (arg_importspecification_))
(T_ImportSpecification_vOut76 _importspecificationIself) = inv_ImportSpecification_s77 _importspecificationX77 (T_ImportSpecification_vIn76 )
_self = rule2646 _importspecificationIself
_lhsOself :: MaybeImportSpecification
_lhsOself = rule2647 _self
__result_ = T_MaybeImportSpecification_vOut97 _lhsOself
in __result_ )
in C_MaybeImportSpecification_s98 v97
rule2646 = \ ((_importspecificationIself) :: ImportSpecification) ->
MaybeImportSpecification_Just _importspecificationIself
rule2647 = \ _self ->
_self
data Inh_MaybeInt = Inh_MaybeInt { }
data Syn_MaybeInt = Syn_MaybeInt { self_Syn_MaybeInt :: (MaybeInt) }
wrap_MaybeInt :: T_MaybeInt -> Inh_MaybeInt -> (Syn_MaybeInt )
wrap_MaybeInt (T_MaybeInt act) (Inh_MaybeInt ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_MaybeInt_vIn100
(T_MaybeInt_vOut100 _lhsOself) <- return (inv_MaybeInt_s101 sem arg)
return (Syn_MaybeInt _lhsOself)
)
sem_MaybeInt :: MaybeInt -> T_MaybeInt
sem_MaybeInt ( MaybeInt_Nothing ) = sem_MaybeInt_Nothing
sem_MaybeInt ( MaybeInt_Just int_ ) = sem_MaybeInt_Just int_
newtype T_MaybeInt = T_MaybeInt {
attach_T_MaybeInt :: Identity (T_MaybeInt_s101 )
}
newtype T_MaybeInt_s101 = C_MaybeInt_s101 {
inv_MaybeInt_s101 :: (T_MaybeInt_v100 )
}
data T_MaybeInt_s102 = C_MaybeInt_s102
type T_MaybeInt_v100 = (T_MaybeInt_vIn100 ) -> (T_MaybeInt_vOut100 )
data T_MaybeInt_vIn100 = T_MaybeInt_vIn100
data T_MaybeInt_vOut100 = T_MaybeInt_vOut100 (MaybeInt)
sem_MaybeInt_Nothing :: T_MaybeInt
sem_MaybeInt_Nothing = T_MaybeInt (return st101) where
st101 = let
v100 :: T_MaybeInt_v100
v100 = \ (T_MaybeInt_vIn100 ) -> ( let
_self = rule2648 ()
_lhsOself :: MaybeInt
_lhsOself = rule2649 _self
__result_ = T_MaybeInt_vOut100 _lhsOself
in __result_ )
in C_MaybeInt_s101 v100
rule2648 = \ (_ :: ()) ->
MaybeInt_Nothing
rule2649 = \ _self ->
_self
sem_MaybeInt_Just :: (Int) -> T_MaybeInt
sem_MaybeInt_Just arg_int_ = T_MaybeInt (return st101) where
st101 = let
v100 :: T_MaybeInt_v100
v100 = \ (T_MaybeInt_vIn100 ) -> ( let
_self = rule2650 arg_int_
_lhsOself :: MaybeInt
_lhsOself = rule2651 _self
__result_ = T_MaybeInt_vOut100 _lhsOself
in __result_ )
in C_MaybeInt_s101 v100
rule2650 = \ int_ ->
MaybeInt_Just int_
rule2651 = \ _self ->
_self
data Inh_MaybeName = Inh_MaybeName { }
data Syn_MaybeName = Syn_MaybeName { self_Syn_MaybeName :: (MaybeName) }
wrap_MaybeName :: T_MaybeName -> Inh_MaybeName -> (Syn_MaybeName )
wrap_MaybeName (T_MaybeName act) (Inh_MaybeName ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_MaybeName_vIn103
(T_MaybeName_vOut103 _lhsOself) <- return (inv_MaybeName_s104 sem arg)
return (Syn_MaybeName _lhsOself)
)
sem_MaybeName :: MaybeName -> T_MaybeName
sem_MaybeName ( MaybeName_Nothing ) = sem_MaybeName_Nothing
sem_MaybeName ( MaybeName_Just name_ ) = sem_MaybeName_Just ( sem_Name name_ )
newtype T_MaybeName = T_MaybeName {
attach_T_MaybeName :: Identity (T_MaybeName_s104 )
}
newtype T_MaybeName_s104 = C_MaybeName_s104 {
inv_MaybeName_s104 :: (T_MaybeName_v103 )
}
data T_MaybeName_s105 = C_MaybeName_s105
type T_MaybeName_v103 = (T_MaybeName_vIn103 ) -> (T_MaybeName_vOut103 )
data T_MaybeName_vIn103 = T_MaybeName_vIn103
data T_MaybeName_vOut103 = T_MaybeName_vOut103 (MaybeName)
sem_MaybeName_Nothing :: T_MaybeName
sem_MaybeName_Nothing = T_MaybeName (return st104) where
st104 = let
v103 :: T_MaybeName_v103
v103 = \ (T_MaybeName_vIn103 ) -> ( let
_self = rule2652 ()
_lhsOself :: MaybeName
_lhsOself = rule2653 _self
__result_ = T_MaybeName_vOut103 _lhsOself
in __result_ )
in C_MaybeName_s104 v103
rule2652 = \ (_ :: ()) ->
MaybeName_Nothing
rule2653 = \ _self ->
_self
sem_MaybeName_Just :: T_Name -> T_MaybeName
sem_MaybeName_Just arg_name_ = T_MaybeName (return st104) where
st104 = let
v103 :: T_MaybeName_v103
v103 = \ (T_MaybeName_vIn103 ) -> ( let
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_self = rule2654 _nameIself
_lhsOself :: MaybeName
_lhsOself = rule2655 _self
__result_ = T_MaybeName_vOut103 _lhsOself
in __result_ )
in C_MaybeName_s104 v103
rule2654 = \ ((_nameIself) :: Name) ->
MaybeName_Just _nameIself
rule2655 = \ _self ->
_self
data Inh_MaybeNames = Inh_MaybeNames { }
data Syn_MaybeNames = Syn_MaybeNames { self_Syn_MaybeNames :: (MaybeNames) }
wrap_MaybeNames :: T_MaybeNames -> Inh_MaybeNames -> (Syn_MaybeNames )
wrap_MaybeNames (T_MaybeNames act) (Inh_MaybeNames ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_MaybeNames_vIn106
(T_MaybeNames_vOut106 _lhsOself) <- return (inv_MaybeNames_s107 sem arg)
return (Syn_MaybeNames _lhsOself)
)
sem_MaybeNames :: MaybeNames -> T_MaybeNames
sem_MaybeNames ( MaybeNames_Nothing ) = sem_MaybeNames_Nothing
sem_MaybeNames ( MaybeNames_Just names_ ) = sem_MaybeNames_Just ( sem_Names names_ )
newtype T_MaybeNames = T_MaybeNames {
attach_T_MaybeNames :: Identity (T_MaybeNames_s107 )
}
newtype T_MaybeNames_s107 = C_MaybeNames_s107 {
inv_MaybeNames_s107 :: (T_MaybeNames_v106 )
}
data T_MaybeNames_s108 = C_MaybeNames_s108
type T_MaybeNames_v106 = (T_MaybeNames_vIn106 ) -> (T_MaybeNames_vOut106 )
data T_MaybeNames_vIn106 = T_MaybeNames_vIn106
data T_MaybeNames_vOut106 = T_MaybeNames_vOut106 (MaybeNames)
sem_MaybeNames_Nothing :: T_MaybeNames
sem_MaybeNames_Nothing = T_MaybeNames (return st107) where
st107 = let
v106 :: T_MaybeNames_v106
v106 = \ (T_MaybeNames_vIn106 ) -> ( let
_self = rule2656 ()
_lhsOself :: MaybeNames
_lhsOself = rule2657 _self
__result_ = T_MaybeNames_vOut106 _lhsOself
in __result_ )
in C_MaybeNames_s107 v106
rule2656 = \ (_ :: ()) ->
MaybeNames_Nothing
rule2657 = \ _self ->
_self
sem_MaybeNames_Just :: T_Names -> T_MaybeNames
sem_MaybeNames_Just arg_names_ = T_MaybeNames (return st107) where
st107 = let
v106 :: T_MaybeNames_v106
v106 = \ (T_MaybeNames_vIn106 ) -> ( let
_namesX116 = Control.Monad.Identity.runIdentity (attach_T_Names (arg_names_))
(T_Names_vOut115 _namesIself) = inv_Names_s116 _namesX116 (T_Names_vIn115 )
_self = rule2658 _namesIself
_lhsOself :: MaybeNames
_lhsOself = rule2659 _self
__result_ = T_MaybeNames_vOut106 _lhsOself
in __result_ )
in C_MaybeNames_s107 v106
rule2658 = \ ((_namesIself) :: Names) ->
MaybeNames_Just _namesIself
rule2659 = \ _self ->
_self
data Inh_Module = Inh_Module { importEnvironment_Inh_Module :: (ImportEnvironment), options_Inh_Module :: ([Option]) }
data Syn_Module = Syn_Module { assumptions_Syn_Module :: (Assumptions), dictionaryEnvironment_Syn_Module :: (DictionaryEnvironment), infoTree_Syn_Module :: (InfoTree), logEntries_Syn_Module :: (LogEntries), self_Syn_Module :: (Module), solveResult_Syn_Module :: (SolveResult ConstraintInfo), toplevelTypes_Syn_Module :: (TypeEnvironment), typeErrors_Syn_Module :: (TypeErrors), warnings_Syn_Module :: (Warnings) }
wrap_Module :: T_Module -> Inh_Module -> (Syn_Module )
wrap_Module (T_Module act) (Inh_Module _lhsIimportEnvironment _lhsIoptions) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Module_vIn109 _lhsIimportEnvironment _lhsIoptions
(T_Module_vOut109 _lhsOassumptions _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOlogEntries _lhsOself _lhsOsolveResult _lhsOtoplevelTypes _lhsOtypeErrors _lhsOwarnings) <- return (inv_Module_s110 sem arg)
return (Syn_Module _lhsOassumptions _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOlogEntries _lhsOself _lhsOsolveResult _lhsOtoplevelTypes _lhsOtypeErrors _lhsOwarnings)
)
sem_Module :: Module -> T_Module
sem_Module ( Module_Module range_ name_ exports_ body_ ) = sem_Module_Module ( sem_Range range_ ) ( sem_MaybeName name_ ) ( sem_MaybeExports exports_ ) ( sem_Body body_ )
newtype T_Module = T_Module {
attach_T_Module :: Identity (T_Module_s110 )
}
newtype T_Module_s110 = C_Module_s110 {
inv_Module_s110 :: (T_Module_v109 )
}
data T_Module_s111 = C_Module_s111
type T_Module_v109 = (T_Module_vIn109 ) -> (T_Module_vOut109 )
data T_Module_vIn109 = T_Module_vIn109 (ImportEnvironment) ([Option])
data T_Module_vOut109 = T_Module_vOut109 (Assumptions) (DictionaryEnvironment) (InfoTree) (LogEntries) (Module) (SolveResult ConstraintInfo) (TypeEnvironment) (TypeErrors) (Warnings)
sem_Module_Module :: T_Range -> T_MaybeName -> T_MaybeExports -> T_Body -> T_Module
sem_Module_Module arg_range_ arg_name_ arg_exports_ arg_body_ = T_Module (return st110) where
st110 = let
v109 :: T_Module_v109
v109 = \ (T_Module_vIn109 _lhsIimportEnvironment _lhsIoptions) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX104 = Control.Monad.Identity.runIdentity (attach_T_MaybeName (arg_name_))
_exportsX92 = Control.Monad.Identity.runIdentity (attach_T_MaybeExports (arg_exports_))
_bodyX14 = Control.Monad.Identity.runIdentity (attach_T_Body (arg_body_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_MaybeName_vOut103 _nameIself) = inv_MaybeName_s104 _nameX104 (T_MaybeName_vIn103 )
(T_MaybeExports_vOut91 _exportsIself) = inv_MaybeExports_s92 _exportsX92 (T_MaybeExports_vIn91 )
(T_Body_vOut13 _bodyIassumptions _bodyIbetaUnique _bodyIcollectErrors _bodyIcollectInstances _bodyIcollectWarnings _bodyIconstraints _bodyIcounter _bodyIdeclVarNames _bodyIdictionaryEnvironment _bodyIinfoTree _bodyImatchIO _bodyIpatternMatchWarnings _bodyIself _bodyItoplevelTypes _bodyIunboundNames _bodyIuniqueChunk) = inv_Body_s14 _bodyX14 (T_Body_vIn13 _bodyOallPatterns _bodyOallTypeSchemes _bodyOavailablePredicates _bodyObetaUnique _bodyOclassEnvironment _bodyOcollectErrors _bodyOcollectWarnings _bodyOcounter _bodyOcurrentChunk _bodyOdictionaryEnvironment _bodyOimportEnvironment _bodyOmatchIO _bodyOmonos _bodyOnamesInScope _bodyOorderedTypeSynonyms _bodyOpatternMatchWarnings _bodyOsubstitution _bodyOtypeschemeMap _bodyOuniqueChunk)
_lhsOwarnings :: Warnings
_lhsOwarnings = rule2660 _bodyIpatternMatchWarnings _warnings
(SolveResult _betaUniqueAtTheEnd _substitution _typeschemeMap _ _solveErrors) = rule2661 _solveResult
(_solveResult,_logEntries) = rule2662 _bodyIbetaUnique _bodyIconstraints _classEnv _lhsIimportEnvironment _lhsIoptions _orderedTypeSynonyms
_orderedTypeSynonyms = rule2663 _lhsIimportEnvironment
_classEnv = rule2664 _bodyIcollectInstances _lhsIimportEnvironment
_typeErrors = rule2665 _bodyIcollectErrors _classEnv _lhsIoptions _orderedTypeSynonyms _solveErrors _substitution
_warnings = rule2666 _bodyIcollectWarnings
_assumptions = rule2667 _bodyIassumptions _substitution
_initialScope = rule2668 _lhsIimportEnvironment
_monos = rule2669 _monomorphics
_monomorphics = rule2670 _lhsIimportEnvironment
_bodyOtypeschemeMap = rule2671 _typeschemeMap
_bodyObetaUnique = rule2672 _monomorphics
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule2673 _bodyIdictionaryEnvironment _lhsIoptions
_bodyOdictionaryEnvironment = rule2674 ()
_bodyOclassEnvironment = rule2675 _classEnv
_bodyOavailablePredicates = rule2676 ()
_bodyOcollectWarnings = rule2677 ()
_bodyOcollectErrors = rule2678 ()
_bodyOallTypeSchemes = rule2679 _lhsIimportEnvironment
_bodyOcurrentChunk = rule2680 ()
_bodyOuniqueChunk = rule2681 ()
(_namesInScope,_unboundNames,_scopeInfo) = rule2682 _bodyIdeclVarNames _bodyIunboundNames _initialScope
_bodyOcounter = rule2683 ()
_bodyOmatchIO = rule2684 ()
_bodyOallPatterns = rule2685 _lhsIimportEnvironment
_bodyOpatternMatchWarnings = rule2686 ()
_self = rule2687 _bodyIself _exportsIself _nameIself _rangeIself
_lhsOself :: Module
_lhsOself = rule2688 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule2689 _assumptions
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2690 _bodyIinfoTree
_lhsOlogEntries :: LogEntries
_lhsOlogEntries = rule2691 _logEntries
_lhsOsolveResult :: SolveResult ConstraintInfo
_lhsOsolveResult = rule2692 _solveResult
_lhsOtoplevelTypes :: TypeEnvironment
_lhsOtoplevelTypes = rule2693 _bodyItoplevelTypes
_lhsOtypeErrors :: TypeErrors
_lhsOtypeErrors = rule2694 _typeErrors
_bodyOimportEnvironment = rule2695 _lhsIimportEnvironment
_bodyOmonos = rule2696 _monos
_bodyOnamesInScope = rule2697 _namesInScope
_bodyOorderedTypeSynonyms = rule2698 _orderedTypeSynonyms
_bodyOsubstitution = rule2699 _substitution
__result_ = T_Module_vOut109 _lhsOassumptions _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOlogEntries _lhsOself _lhsOsolveResult _lhsOtoplevelTypes _lhsOtypeErrors _lhsOwarnings
in __result_ )
in C_Module_s110 v109
rule2660 = \ ((_bodyIpatternMatchWarnings) :: [Warning]) _warnings ->
_warnings ++ _bodyIpatternMatchWarnings
rule2661 = \ _solveResult ->
_solveResult
rule2662 = \ ((_bodyIbetaUnique) :: Int) ((_bodyIconstraints) :: ConstraintSet) _classEnv ((_lhsIimportEnvironment) :: ImportEnvironment) ((_lhsIoptions) :: [Option]) _orderedTypeSynonyms ->
(selectConstraintSolver _lhsIoptions _lhsIimportEnvironment)
_classEnv
_orderedTypeSynonyms
_bodyIbetaUnique
_bodyIconstraints
rule2663 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
getOrderedTypeSynonyms _lhsIimportEnvironment
rule2664 = \ ((_bodyIcollectInstances) :: [(Name, Instance)]) ((_lhsIimportEnvironment) :: ImportEnvironment) ->
foldr (\(n, i) -> insertInstance (show n) i)
(createClassEnvironment _lhsIimportEnvironment)
_bodyIcollectInstances
rule2665 = \ ((_bodyIcollectErrors) :: TypeErrors) _classEnv ((_lhsIoptions) :: [Option]) _orderedTypeSynonyms _solveErrors _substitution ->
case makeTypeErrors _lhsIoptions _classEnv _orderedTypeSynonyms _substitution _solveErrors of
[] -> if NoOverloadingTypeCheck `elem` _lhsIoptions
then filter (\(TypeError _ ms _ _) -> not $ isInfixOf "Illegal overloaded type" $ show ms) _bodyIcollectErrors
else _bodyIcollectErrors
errs -> reverse errs
rule2666 = \ ((_bodyIcollectWarnings) :: Warnings) ->
_bodyIcollectWarnings
rule2667 = \ ((_bodyIassumptions) :: Assumptions) _substitution ->
let f xs = [ (n, _substitution |-> tp) | (n, tp) <- xs ]
in M.map f _bodyIassumptions
rule2668 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
M.keys (typeEnvironment _lhsIimportEnvironment)
rule2669 = \ _monomorphics ->
map TVar _monomorphics
rule2670 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
ftv ( (M.elems $ valueConstructors _lhsIimportEnvironment)
++ (M.elems $ typeEnvironment _lhsIimportEnvironment)
)
rule2671 = \ _typeschemeMap ->
M.fromList (M.assocs _typeschemeMap)
rule2672 = \ _monomorphics ->
if null _monomorphics
then 0
else maximum _monomorphics + 1
rule2673 = \ ((_bodyIdictionaryEnvironment) :: DictionaryEnvironment) ((_lhsIoptions) :: [Option]) ->
if Overloading `elem` _lhsIoptions
then _bodyIdictionaryEnvironment
else emptyDictionaryEnvironment
rule2674 = \ (_ :: ()) ->
emptyDictionaryEnvironment
rule2675 = \ _classEnv ->
_classEnv
rule2676 = \ (_ :: ()) ->
[]
rule2677 = \ (_ :: ()) ->
[]
rule2678 = \ (_ :: ()) ->
[]
rule2679 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
M.fromList [ (NameWithRange name, scheme) | (name, scheme) <- M.assocs (typeEnvironment _lhsIimportEnvironment) ]
rule2680 = \ (_ :: ()) ->
0
rule2681 = \ (_ :: ()) ->
1
rule2682 = \ ((_bodyIdeclVarNames) :: Names) ((_bodyIunboundNames) :: Names) _initialScope ->
changeOfScope (_initialScope ++ _bodyIdeclVarNames) _bodyIunboundNames []
rule2683 = \ (_ :: ()) ->
0
rule2684 = \ (_ :: ()) ->
return ()
rule2685 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
[ (matchInfo, typingStrategy)
| typingStrategy <- typingStrategies _lhsIimportEnvironment
, matchInfo <- matchInformation
_lhsIimportEnvironment
typingStrategy
]
rule2686 = \ (_ :: ()) ->
[]
rule2687 = \ ((_bodyIself) :: Body) ((_exportsIself) :: MaybeExports) ((_nameIself) :: MaybeName) ((_rangeIself) :: Range) ->
Module_Module _rangeIself _nameIself _exportsIself _bodyIself
rule2688 = \ _self ->
_self
rule2689 = \ _assumptions ->
_assumptions
rule2690 = \ ((_bodyIinfoTree) :: InfoTree) ->
_bodyIinfoTree
rule2691 = \ _logEntries ->
_logEntries
rule2692 = \ _solveResult ->
_solveResult
rule2693 = \ ((_bodyItoplevelTypes) :: TypeEnvironment) ->
_bodyItoplevelTypes
rule2694 = \ _typeErrors ->
_typeErrors
rule2695 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2696 = \ _monos ->
_monos
rule2697 = \ _namesInScope ->
_namesInScope
rule2698 = \ _orderedTypeSynonyms ->
_orderedTypeSynonyms
rule2699 = \ _substitution ->
_substitution
data Inh_Name = Inh_Name { }
data Syn_Name = Syn_Name { self_Syn_Name :: (Name) }
wrap_Name :: T_Name -> Inh_Name -> (Syn_Name )
wrap_Name (T_Name act) (Inh_Name ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Name_vIn112
(T_Name_vOut112 _lhsOself) <- return (inv_Name_s113 sem arg)
return (Syn_Name _lhsOself)
)
sem_Name :: Name -> T_Name
sem_Name ( Name_Identifier range_ module_ name_ ) = sem_Name_Identifier ( sem_Range range_ ) ( sem_Strings module_ ) name_
sem_Name ( Name_Operator range_ module_ name_ ) = sem_Name_Operator ( sem_Range range_ ) ( sem_Strings module_ ) name_
sem_Name ( Name_Special range_ module_ name_ ) = sem_Name_Special ( sem_Range range_ ) ( sem_Strings module_ ) name_
newtype T_Name = T_Name {
attach_T_Name :: Identity (T_Name_s113 )
}
newtype T_Name_s113 = C_Name_s113 {
inv_Name_s113 :: (T_Name_v112 )
}
data T_Name_s114 = C_Name_s114
type T_Name_v112 = (T_Name_vIn112 ) -> (T_Name_vOut112 )
data T_Name_vIn112 = T_Name_vIn112
data T_Name_vOut112 = T_Name_vOut112 (Name)
sem_Name_Identifier :: T_Range -> T_Strings -> (String) -> T_Name
sem_Name_Identifier arg_range_ arg_module_ arg_name_ = T_Name (return st113) where
st113 = let
v112 :: T_Name_v112
v112 = \ (T_Name_vIn112 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_moduleX161 = Control.Monad.Identity.runIdentity (attach_T_Strings (arg_module_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Strings_vOut160 _moduleIself) = inv_Strings_s161 _moduleX161 (T_Strings_vIn160 )
_self = rule2700 _moduleIself _rangeIself arg_name_
_lhsOself :: Name
_lhsOself = rule2701 _self
__result_ = T_Name_vOut112 _lhsOself
in __result_ )
in C_Name_s113 v112
rule2700 = \ ((_moduleIself) :: Strings) ((_rangeIself) :: Range) name_ ->
Name_Identifier _rangeIself _moduleIself name_
rule2701 = \ _self ->
_self
sem_Name_Operator :: T_Range -> T_Strings -> (String) -> T_Name
sem_Name_Operator arg_range_ arg_module_ arg_name_ = T_Name (return st113) where
st113 = let
v112 :: T_Name_v112
v112 = \ (T_Name_vIn112 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_moduleX161 = Control.Monad.Identity.runIdentity (attach_T_Strings (arg_module_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Strings_vOut160 _moduleIself) = inv_Strings_s161 _moduleX161 (T_Strings_vIn160 )
_self = rule2702 _moduleIself _rangeIself arg_name_
_lhsOself :: Name
_lhsOself = rule2703 _self
__result_ = T_Name_vOut112 _lhsOself
in __result_ )
in C_Name_s113 v112
rule2702 = \ ((_moduleIself) :: Strings) ((_rangeIself) :: Range) name_ ->
Name_Operator _rangeIself _moduleIself name_
rule2703 = \ _self ->
_self
sem_Name_Special :: T_Range -> T_Strings -> (String) -> T_Name
sem_Name_Special arg_range_ arg_module_ arg_name_ = T_Name (return st113) where
st113 = let
v112 :: T_Name_v112
v112 = \ (T_Name_vIn112 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_moduleX161 = Control.Monad.Identity.runIdentity (attach_T_Strings (arg_module_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Strings_vOut160 _moduleIself) = inv_Strings_s161 _moduleX161 (T_Strings_vIn160 )
_self = rule2704 _moduleIself _rangeIself arg_name_
_lhsOself :: Name
_lhsOself = rule2705 _self
__result_ = T_Name_vOut112 _lhsOself
in __result_ )
in C_Name_s113 v112
rule2704 = \ ((_moduleIself) :: Strings) ((_rangeIself) :: Range) name_ ->
Name_Special _rangeIself _moduleIself name_
rule2705 = \ _self ->
_self
data Inh_Names = Inh_Names { }
data Syn_Names = Syn_Names { self_Syn_Names :: (Names) }
wrap_Names :: T_Names -> Inh_Names -> (Syn_Names )
wrap_Names (T_Names act) (Inh_Names ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Names_vIn115
(T_Names_vOut115 _lhsOself) <- return (inv_Names_s116 sem arg)
return (Syn_Names _lhsOself)
)
sem_Names :: Names -> T_Names
sem_Names list = Prelude.foldr sem_Names_Cons sem_Names_Nil (Prelude.map sem_Name list)
newtype T_Names = T_Names {
attach_T_Names :: Identity (T_Names_s116 )
}
newtype T_Names_s116 = C_Names_s116 {
inv_Names_s116 :: (T_Names_v115 )
}
data T_Names_s117 = C_Names_s117
type T_Names_v115 = (T_Names_vIn115 ) -> (T_Names_vOut115 )
data T_Names_vIn115 = T_Names_vIn115
data T_Names_vOut115 = T_Names_vOut115 (Names)
sem_Names_Cons :: T_Name -> T_Names -> T_Names
sem_Names_Cons arg_hd_ arg_tl_ = T_Names (return st116) where
st116 = let
v115 :: T_Names_v115
v115 = \ (T_Names_vIn115 ) -> ( let
_hdX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_hd_))
_tlX116 = Control.Monad.Identity.runIdentity (attach_T_Names (arg_tl_))
(T_Name_vOut112 _hdIself) = inv_Name_s113 _hdX113 (T_Name_vIn112 )
(T_Names_vOut115 _tlIself) = inv_Names_s116 _tlX116 (T_Names_vIn115 )
_self = rule2706 _hdIself _tlIself
_lhsOself :: Names
_lhsOself = rule2707 _self
__result_ = T_Names_vOut115 _lhsOself
in __result_ )
in C_Names_s116 v115
rule2706 = \ ((_hdIself) :: Name) ((_tlIself) :: Names) ->
(:) _hdIself _tlIself
rule2707 = \ _self ->
_self
sem_Names_Nil :: T_Names
sem_Names_Nil = T_Names (return st116) where
st116 = let
v115 :: T_Names_v115
v115 = \ (T_Names_vIn115 ) -> ( let
_self = rule2708 ()
_lhsOself :: Names
_lhsOself = rule2709 _self
__result_ = T_Names_vOut115 _lhsOself
in __result_ )
in C_Names_s116 v115
rule2708 = \ (_ :: ()) ->
[]
rule2709 = \ _self ->
_self
data Inh_Pattern = Inh_Pattern { betaUnique_Inh_Pattern :: (Int), counter_Inh_Pattern :: (Int), importEnvironment_Inh_Pattern :: (ImportEnvironment), monos_Inh_Pattern :: (Monos), namesInScope_Inh_Pattern :: (Names), parentTree_Inh_Pattern :: (InfoTree), patternMatchWarnings_Inh_Pattern :: ([Warning]) }
data Syn_Pattern = Syn_Pattern { beta_Syn_Pattern :: (Tp), betaUnique_Syn_Pattern :: (Int), constraints_Syn_Pattern :: (ConstraintSet), counter_Syn_Pattern :: (Int), elements_Syn_Pattern :: ( [PatternElement] ), environment_Syn_Pattern :: (PatternAssumptions), infoTree_Syn_Pattern :: (InfoTree), patVarNames_Syn_Pattern :: (Names), patternMatchWarnings_Syn_Pattern :: ([Warning]), self_Syn_Pattern :: (Pattern), unboundNames_Syn_Pattern :: (Names) }
wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )
wrap_Pattern (T_Pattern act) (Inh_Pattern _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings
(T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames) <- return (inv_Pattern_s119 sem arg)
return (Syn_Pattern _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames)
)
sem_Pattern :: Pattern -> T_Pattern
sem_Pattern ( Pattern_Hole range_ id_ ) = sem_Pattern_Hole ( sem_Range range_ ) id_
sem_Pattern ( Pattern_Literal range_ literal_ ) = sem_Pattern_Literal ( sem_Range range_ ) ( sem_Literal literal_ )
sem_Pattern ( Pattern_Variable range_ name_ ) = sem_Pattern_Variable ( sem_Range range_ ) ( sem_Name name_ )
sem_Pattern ( Pattern_Constructor range_ name_ patterns_ ) = sem_Pattern_Constructor ( sem_Range range_ ) ( sem_Name name_ ) ( sem_Patterns patterns_ )
sem_Pattern ( Pattern_Parenthesized range_ pattern_ ) = sem_Pattern_Parenthesized ( sem_Range range_ ) ( sem_Pattern pattern_ )
sem_Pattern ( Pattern_InfixConstructor range_ leftPattern_ constructorOperator_ rightPattern_ ) = sem_Pattern_InfixConstructor ( sem_Range range_ ) ( sem_Pattern leftPattern_ ) ( sem_Name constructorOperator_ ) ( sem_Pattern rightPattern_ )
sem_Pattern ( Pattern_List range_ patterns_ ) = sem_Pattern_List ( sem_Range range_ ) ( sem_Patterns patterns_ )
sem_Pattern ( Pattern_Tuple range_ patterns_ ) = sem_Pattern_Tuple ( sem_Range range_ ) ( sem_Patterns patterns_ )
sem_Pattern ( Pattern_Record range_ name_ recordPatternBindings_ ) = sem_Pattern_Record ( sem_Range range_ ) ( sem_Name name_ ) ( sem_RecordPatternBindings recordPatternBindings_ )
sem_Pattern ( Pattern_Negate range_ literal_ ) = sem_Pattern_Negate ( sem_Range range_ ) ( sem_Literal literal_ )
sem_Pattern ( Pattern_As range_ name_ pattern_ ) = sem_Pattern_As ( sem_Range range_ ) ( sem_Name name_ ) ( sem_Pattern pattern_ )
sem_Pattern ( Pattern_Wildcard range_ ) = sem_Pattern_Wildcard ( sem_Range range_ )
sem_Pattern ( Pattern_Irrefutable range_ pattern_ ) = sem_Pattern_Irrefutable ( sem_Range range_ ) ( sem_Pattern pattern_ )
sem_Pattern ( Pattern_Successor range_ name_ literal_ ) = sem_Pattern_Successor ( sem_Range range_ ) ( sem_Name name_ ) ( sem_Literal literal_ )
sem_Pattern ( Pattern_NegateFloat range_ literal_ ) = sem_Pattern_NegateFloat ( sem_Range range_ ) ( sem_Literal literal_ )
newtype T_Pattern = T_Pattern {
attach_T_Pattern :: Identity (T_Pattern_s119 )
}
newtype T_Pattern_s119 = C_Pattern_s119 {
inv_Pattern_s119 :: (T_Pattern_v118 )
}
data T_Pattern_s120 = C_Pattern_s120
type T_Pattern_v118 = (T_Pattern_vIn118 ) -> (T_Pattern_vOut118 )
data T_Pattern_vIn118 = T_Pattern_vIn118 (Int) (Int) (ImportEnvironment) (Monos) (Names) (InfoTree) ([Warning])
data T_Pattern_vOut118 = T_Pattern_vOut118 (Tp) (Int) (ConstraintSet) (Int) ( [PatternElement] ) (PatternAssumptions) (InfoTree) (Names) ([Warning]) (Pattern) (Names)
sem_Pattern_Hole :: T_Range -> (Integer) -> T_Pattern
sem_Pattern_Hole arg_range_ arg_id_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2710 _lhsIbetaUnique
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2711 ()
_constraints = rule2712 ()
_beta = rule2713 _lhsIbetaUnique
_localInfo = rule2714 _beta _lhsImonos _self
_parentTree = rule2715 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2716 _parentTree
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2717 _i
_lhsOelements :: [PatternElement]
_lhsOelements = rule2718 ()
_lhsOcounter :: Int
_i :: Int
(_lhsOcounter,_i) = rule2719 _lhsIcounter
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2720 ()
_self = rule2721 _rangeIself arg_id_
_lhsOself :: Pattern
_lhsOself = rule2722 _self
_lhsObeta :: Tp
_lhsObeta = rule2723 _beta
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2724 _constraints
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2725 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2710 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule2711 = \ (_ :: ()) ->
noAssumptions
rule2712 = \ (_ :: ()) ->
emptyTree
rule2713 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule2714 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule2715 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule2716 = \ _parentTree ->
_parentTree
rule2717 = \ ((_i) :: Int) ->
[ Name_Special noRange [] ("hole" ++ show _i ) ]
rule2718 = \ (_ :: ()) ->
[FiniteElement hole]
rule2719 = \ ((_lhsIcounter) :: Int) ->
let __cont = _lhsIcounter in seq __cont ( case nextUnique __cont of { (__cont, i) -> (__cont,i)} )
rule2720 = \ (_ :: ()) ->
[]
rule2721 = \ ((_rangeIself) :: Range) id_ ->
Pattern_Hole _rangeIself id_
rule2722 = \ _self ->
_self
rule2723 = \ _beta ->
_beta
rule2724 = \ _constraints ->
_constraints
rule2725 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_Literal :: T_Range -> T_Literal -> T_Pattern
sem_Pattern_Literal arg_range_ arg_literal_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_literalX86 = Control.Monad.Identity.runIdentity (attach_T_Literal (arg_literal_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Literal_vOut85 _literalIelements _literalIliteralType _literalIself) = inv_Literal_s86 _literalX86 (T_Literal_vIn85 )
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2726 _lhsIbetaUnique
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2727 ()
_constraints = rule2728 _beta _cinfo _literalIliteralType
_beta = rule2729 _lhsIbetaUnique
_cinfo = rule2730 _parentTree
_localInfo = rule2731 _beta _lhsImonos _self
_parentTree = rule2732 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2733 _parentTree
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2734 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2735 ()
_self = rule2736 _literalIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2737 _self
_lhsObeta :: Tp
_lhsObeta = rule2738 _beta
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2739 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2740 _lhsIcounter
_lhsOelements :: [PatternElement]
_lhsOelements = rule2741 _literalIelements
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2742 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2726 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule2727 = \ (_ :: ()) ->
noAssumptions
rule2728 = \ _beta _cinfo ((_literalIliteralType) :: Tp) ->
unitTree ((_literalIliteralType .==. _beta) _cinfo)
rule2729 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule2730 = \ _parentTree ->
resultConstraint "literal pattern" _parentTree
[ FolkloreConstraint, HasTrustFactor 10.0 ]
rule2731 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule2732 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule2733 = \ _parentTree ->
_parentTree
rule2734 = \ (_ :: ()) ->
[]
rule2735 = \ (_ :: ()) ->
[]
rule2736 = \ ((_literalIself) :: Literal) ((_rangeIself) :: Range) ->
Pattern_Literal _rangeIself _literalIself
rule2737 = \ _self ->
_self
rule2738 = \ _beta ->
_beta
rule2739 = \ _constraints ->
_constraints
rule2740 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2741 = \ ((_literalIelements) :: [PatternElement] ) ->
_literalIelements
rule2742 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_Variable :: T_Range -> T_Name -> T_Pattern
sem_Pattern_Variable arg_range_ arg_name_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2743 _lhsIbetaUnique
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2744 _beta _nameIself
_constraints = rule2745 _lhsIbetaUnique
_beta = rule2746 _lhsIbetaUnique
_localInfo = rule2747 _beta _lhsImonos _self
_parentTree = rule2748 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2749 _parentTree
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2750 _nameIself
_lhsOelements :: [PatternElement]
_lhsOelements = rule2751 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2752 ()
_self = rule2753 _nameIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2754 _self
_lhsObeta :: Tp
_lhsObeta = rule2755 _beta
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2756 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2757 _lhsIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2758 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2743 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule2744 = \ _beta ((_nameIself) :: Name) ->
M.singleton _nameIself _beta
rule2745 = \ ((_lhsIbetaUnique) :: Int) ->
Receive _lhsIbetaUnique
rule2746 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule2747 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule2748 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule2749 = \ _parentTree ->
_parentTree
rule2750 = \ ((_nameIself) :: Name) ->
[ _nameIself ]
rule2751 = \ (_ :: ()) ->
[WildcardElement]
rule2752 = \ (_ :: ()) ->
[]
rule2753 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Pattern_Variable _rangeIself _nameIself
rule2754 = \ _self ->
_self
rule2755 = \ _beta ->
_beta
rule2756 = \ _constraints ->
_constraints
rule2757 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2758 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_Constructor :: T_Range -> T_Name -> T_Patterns -> T_Pattern
sem_Pattern_Constructor arg_range_ arg_name_ arg_patterns_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_patternsX122 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_patterns_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_Patterns_vOut121 _patternsIbetaUnique _patternsIbetas _patternsIconstraintslist _patternsIcounter _patternsIelementss _patternsIenvironment _patternsIinfoTrees _patternsInumberOfPatterns _patternsIpatVarNames _patternsIpatternMatchWarnings _patternsIself _patternsIunboundNames) = inv_Patterns_s122 _patternsX122 (T_Patterns_vIn121 _patternsObetaUnique _patternsOcounter _patternsOimportEnvironment _patternsOmonos _patternsOnamesInScope _patternsOparentTree _patternsOpatternMatchWarnings)
_patternsObetaUnique = rule2759 _lhsIbetaUnique
_constraints = rule2760 _conApply _conConstructor _patternsIconstraintslist
_beta = rule2761 _lhsIbetaUnique
_betaCon = rule2762 _lhsIbetaUnique
_conApply = rule2763 _beta _betaCon _cinfoApply _cinfoEmpty _patternsIbetas _patternsInumberOfPatterns
_conConstructor = rule2764 _betaCon _cinfoConstructor _lhsIimportEnvironment _nameIself
_cinfoConstructor = rule2765 _parentTree
_cinfoApply = rule2766 _localInfo _nameIself _parentTree _patternsIinfoTrees
_cinfoEmpty = rule2767 _parentTree
_localInfo = rule2768 _beta _lhsImonos _self
_parentTree = rule2769 _lhsIparentTree _localInfo _patternsIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2770 _parentTree
_lhsOelements :: [PatternElement]
_lhsOelements = rule2771 _nameIself _patternsIelementss
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2772 _patternsIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2773 _patternsIunboundNames
_self = rule2774 _nameIself _patternsIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2775 _self
_lhsObeta :: Tp
_lhsObeta = rule2776 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2777 _patternsIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2778 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2779 _patternsIcounter
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2780 _patternsIenvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2781 _patternsIpatternMatchWarnings
_patternsOcounter = rule2782 _lhsIcounter
_patternsOimportEnvironment = rule2783 _lhsIimportEnvironment
_patternsOmonos = rule2784 _lhsImonos
_patternsOnamesInScope = rule2785 _lhsInamesInScope
_patternsOparentTree = rule2786 _parentTree
_patternsOpatternMatchWarnings = rule2787 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2759 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 2
rule2760 = \ _conApply _conConstructor ((_patternsIconstraintslist) :: ConstraintSets) ->
_conApply .>.
Node [ listTree _conConstructor
, Node _patternsIconstraintslist
]
rule2761 = \ ((_lhsIbetaUnique) :: Int) ->
TVar (_lhsIbetaUnique)
rule2762 = \ ((_lhsIbetaUnique) :: Int) ->
TVar (_lhsIbetaUnique + 1)
rule2763 = \ _beta _betaCon _cinfoApply _cinfoEmpty ((_patternsIbetas) :: Tps) ((_patternsInumberOfPatterns) :: Int) ->
[ (_betaCon .==. foldr (.->.) _beta _patternsIbetas)
(if _patternsInumberOfPatterns == 0 then _cinfoEmpty else _cinfoApply) ]
rule2764 = \ _betaCon _cinfoConstructor ((_lhsIimportEnvironment) :: ImportEnvironment) ((_nameIself) :: Name) ->
case M.lookup _nameIself (valueConstructors _lhsIimportEnvironment) of
Nothing -> []
Just ctp -> [ (_betaCon .::. ctp) _cinfoConstructor ]
rule2765 = \ _parentTree ->
resultConstraint "pattern constructor" _parentTree
[ FolkloreConstraint, HasTrustFactor 10.0 ]
rule2766 = \ _localInfo ((_nameIself) :: Name) _parentTree ((_patternsIinfoTrees) :: InfoTrees) ->
specialConstraint "pattern application" _parentTree
(self _localInfo, Just $ nameToUHA_Pat _nameIself)
[ ApplicationEdge False (map attribute _patternsIinfoTrees) ]
rule2767 = \ _parentTree ->
resultConstraint "pattern constructor" _parentTree
[ HasTrustFactor 10.0 ]
rule2768 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule2769 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ((_patternsIinfoTrees) :: InfoTrees) ->
node _lhsIparentTree _localInfo _patternsIinfoTrees
rule2770 = \ _parentTree ->
_parentTree
rule2771 = \ ((_nameIself) :: Name) ((_patternsIelementss) :: [ [PatternElement] ]) ->
FiniteElement (getNameName _nameIself) : concat _patternsIelementss
rule2772 = \ ((_patternsIpatVarNames) :: Names) ->
_patternsIpatVarNames
rule2773 = \ ((_patternsIunboundNames) :: Names) ->
_patternsIunboundNames
rule2774 = \ ((_nameIself) :: Name) ((_patternsIself) :: Patterns) ((_rangeIself) :: Range) ->
Pattern_Constructor _rangeIself _nameIself _patternsIself
rule2775 = \ _self ->
_self
rule2776 = \ _beta ->
_beta
rule2777 = \ ((_patternsIbetaUnique) :: Int) ->
_patternsIbetaUnique
rule2778 = \ _constraints ->
_constraints
rule2779 = \ ((_patternsIcounter) :: Int) ->
_patternsIcounter
rule2780 = \ ((_patternsIenvironment) :: PatternAssumptions) ->
_patternsIenvironment
rule2781 = \ ((_patternsIpatternMatchWarnings) :: [Warning]) ->
_patternsIpatternMatchWarnings
rule2782 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2783 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2784 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2785 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2786 = \ _parentTree ->
_parentTree
rule2787 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_Parenthesized :: T_Range -> T_Pattern -> T_Pattern
sem_Pattern_Parenthesized arg_range_ arg_pattern_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_patternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Pattern_vOut118 _patternIbeta _patternIbetaUnique _patternIconstraints _patternIcounter _patternIelements _patternIenvironment _patternIinfoTree _patternIpatVarNames _patternIpatternMatchWarnings _patternIself _patternIunboundNames) = inv_Pattern_s119 _patternX119 (T_Pattern_vIn118 _patternObetaUnique _patternOcounter _patternOimportEnvironment _patternOmonos _patternOnamesInScope _patternOparentTree _patternOpatternMatchWarnings)
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2788 _patternIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2789 _patternIunboundNames
_self = rule2790 _patternIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2791 _self
_lhsObeta :: Tp
_lhsObeta = rule2792 _patternIbeta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2793 _patternIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2794 _patternIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule2795 _patternIcounter
_lhsOelements :: [PatternElement]
_lhsOelements = rule2796 _patternIelements
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2797 _patternIenvironment
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2798 _patternIinfoTree
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2799 _patternIpatternMatchWarnings
_patternObetaUnique = rule2800 _lhsIbetaUnique
_patternOcounter = rule2801 _lhsIcounter
_patternOimportEnvironment = rule2802 _lhsIimportEnvironment
_patternOmonos = rule2803 _lhsImonos
_patternOnamesInScope = rule2804 _lhsInamesInScope
_patternOparentTree = rule2805 _lhsIparentTree
_patternOpatternMatchWarnings = rule2806 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2788 = \ ((_patternIpatVarNames) :: Names) ->
_patternIpatVarNames
rule2789 = \ ((_patternIunboundNames) :: Names) ->
_patternIunboundNames
rule2790 = \ ((_patternIself) :: Pattern) ((_rangeIself) :: Range) ->
Pattern_Parenthesized _rangeIself _patternIself
rule2791 = \ _self ->
_self
rule2792 = \ ((_patternIbeta) :: Tp) ->
_patternIbeta
rule2793 = \ ((_patternIbetaUnique) :: Int) ->
_patternIbetaUnique
rule2794 = \ ((_patternIconstraints) :: ConstraintSet) ->
_patternIconstraints
rule2795 = \ ((_patternIcounter) :: Int) ->
_patternIcounter
rule2796 = \ ((_patternIelements) :: [PatternElement] ) ->
_patternIelements
rule2797 = \ ((_patternIenvironment) :: PatternAssumptions) ->
_patternIenvironment
rule2798 = \ ((_patternIinfoTree) :: InfoTree) ->
_patternIinfoTree
rule2799 = \ ((_patternIpatternMatchWarnings) :: [Warning]) ->
_patternIpatternMatchWarnings
rule2800 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2801 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2802 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2803 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2804 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2805 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2806 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_InfixConstructor :: T_Range -> T_Pattern -> T_Name -> T_Pattern -> T_Pattern
sem_Pattern_InfixConstructor arg_range_ arg_leftPattern_ arg_constructorOperator_ arg_rightPattern_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_leftPatternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_leftPattern_))
_constructorOperatorX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_constructorOperator_))
_rightPatternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_rightPattern_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Pattern_vOut118 _leftPatternIbeta _leftPatternIbetaUnique _leftPatternIconstraints _leftPatternIcounter _leftPatternIelements _leftPatternIenvironment _leftPatternIinfoTree _leftPatternIpatVarNames _leftPatternIpatternMatchWarnings _leftPatternIself _leftPatternIunboundNames) = inv_Pattern_s119 _leftPatternX119 (T_Pattern_vIn118 _leftPatternObetaUnique _leftPatternOcounter _leftPatternOimportEnvironment _leftPatternOmonos _leftPatternOnamesInScope _leftPatternOparentTree _leftPatternOpatternMatchWarnings)
(T_Name_vOut112 _constructorOperatorIself) = inv_Name_s113 _constructorOperatorX113 (T_Name_vIn112 )
(T_Pattern_vOut118 _rightPatternIbeta _rightPatternIbetaUnique _rightPatternIconstraints _rightPatternIcounter _rightPatternIelements _rightPatternIenvironment _rightPatternIinfoTree _rightPatternIpatVarNames _rightPatternIpatternMatchWarnings _rightPatternIself _rightPatternIunboundNames) = inv_Pattern_s119 _rightPatternX119 (T_Pattern_vIn118 _rightPatternObetaUnique _rightPatternOcounter _rightPatternOimportEnvironment _rightPatternOmonos _rightPatternOnamesInScope _rightPatternOparentTree _rightPatternOpatternMatchWarnings)
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2807 _leftPatternIenvironment _rightPatternIenvironment
_leftPatternObetaUnique = rule2808 _lhsIbetaUnique
_constraints = rule2809 _conApply _conConstructor _leftPatternIconstraints _rightPatternIconstraints
_beta = rule2810 _lhsIbetaUnique
_betaCon = rule2811 _lhsIbetaUnique
_conApply = rule2812 _beta _betaCon _cinfoApply _leftPatternIbeta _rightPatternIbeta
_conConstructor = rule2813 _betaCon _cinfoConstructor _constructorOperatorIself _lhsIimportEnvironment
_cinfoConstructor = rule2814 _constructorOperatorIself
_cinfoApply = rule2815 _constructorOperatorIself _leftPatternIinfoTree _localInfo _parentTree _rightPatternIinfoTree
_localInfo = rule2816 _beta _lhsImonos _self
_parentTree = rule2817 _leftPatternIinfoTree _lhsIparentTree _localInfo _rightPatternIinfoTree
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2818 _parentTree
_lhsOelements :: [PatternElement]
_lhsOelements = rule2819 _constructorOperatorIself _leftPatternIelements _rightPatternIelements
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2820 _leftPatternIpatVarNames _rightPatternIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2821 _leftPatternIunboundNames _rightPatternIunboundNames
_self = rule2822 _constructorOperatorIself _leftPatternIself _rangeIself _rightPatternIself
_lhsOself :: Pattern
_lhsOself = rule2823 _self
_lhsObeta :: Tp
_lhsObeta = rule2824 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2825 _rightPatternIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2826 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2827 _rightPatternIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2828 _rightPatternIpatternMatchWarnings
_leftPatternOcounter = rule2829 _lhsIcounter
_leftPatternOimportEnvironment = rule2830 _lhsIimportEnvironment
_leftPatternOmonos = rule2831 _lhsImonos
_leftPatternOnamesInScope = rule2832 _lhsInamesInScope
_leftPatternOparentTree = rule2833 _parentTree
_leftPatternOpatternMatchWarnings = rule2834 _lhsIpatternMatchWarnings
_rightPatternObetaUnique = rule2835 _leftPatternIbetaUnique
_rightPatternOcounter = rule2836 _leftPatternIcounter
_rightPatternOimportEnvironment = rule2837 _lhsIimportEnvironment
_rightPatternOmonos = rule2838 _lhsImonos
_rightPatternOnamesInScope = rule2839 _lhsInamesInScope
_rightPatternOparentTree = rule2840 _parentTree
_rightPatternOpatternMatchWarnings = rule2841 _leftPatternIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2807 = \ ((_leftPatternIenvironment) :: PatternAssumptions) ((_rightPatternIenvironment) :: PatternAssumptions) ->
_leftPatternIenvironment `M.union` _rightPatternIenvironment
rule2808 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 2
rule2809 = \ _conApply _conConstructor ((_leftPatternIconstraints) :: ConstraintSet) ((_rightPatternIconstraints) :: ConstraintSet) ->
_conApply .>.
Node [ listTree _conConstructor
, _leftPatternIconstraints
, _rightPatternIconstraints
]
rule2810 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule2811 = \ ((_lhsIbetaUnique) :: Int) ->
TVar (_lhsIbetaUnique + 1)
rule2812 = \ _beta _betaCon _cinfoApply ((_leftPatternIbeta) :: Tp) ((_rightPatternIbeta) :: Tp) ->
[ (_betaCon .==. _leftPatternIbeta .->. _rightPatternIbeta .->. _beta) _cinfoApply ]
rule2813 = \ _betaCon _cinfoConstructor ((_constructorOperatorIself) :: Name) ((_lhsIimportEnvironment) :: ImportEnvironment) ->
case M.lookup _constructorOperatorIself (valueConstructors _lhsIimportEnvironment) of
Nothing -> []
Just ctp -> [ (_betaCon .::. ctp) _cinfoConstructor ]
rule2814 = \ ((_constructorOperatorIself) :: Name) ->
variableConstraint "pattern constructor" (nameToUHA_Pat _constructorOperatorIself)
[ FolkloreConstraint, HasTrustFactor 10.0 ]
rule2815 = \ ((_constructorOperatorIself) :: Name) ((_leftPatternIinfoTree) :: InfoTree) _localInfo _parentTree ((_rightPatternIinfoTree) :: InfoTree) ->
specialConstraint "infix pattern application" _parentTree
(self _localInfo, Just $ nameToUHA_Pat _constructorOperatorIself)
[ ApplicationEdge True (map attribute [_leftPatternIinfoTree, _rightPatternIinfoTree]) ]
rule2816 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule2817 = \ ((_leftPatternIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ((_rightPatternIinfoTree) :: InfoTree) ->
node _lhsIparentTree _localInfo [_leftPatternIinfoTree, _rightPatternIinfoTree]
rule2818 = \ _parentTree ->
_parentTree
rule2819 = \ ((_constructorOperatorIself) :: Name) ((_leftPatternIelements) :: [PatternElement] ) ((_rightPatternIelements) :: [PatternElement] ) ->
FiniteElement (getNameName _constructorOperatorIself) : _leftPatternIelements ++ _rightPatternIelements
rule2820 = \ ((_leftPatternIpatVarNames) :: Names) ((_rightPatternIpatVarNames) :: Names) ->
_leftPatternIpatVarNames ++ _rightPatternIpatVarNames
rule2821 = \ ((_leftPatternIunboundNames) :: Names) ((_rightPatternIunboundNames) :: Names) ->
_leftPatternIunboundNames ++ _rightPatternIunboundNames
rule2822 = \ ((_constructorOperatorIself) :: Name) ((_leftPatternIself) :: Pattern) ((_rangeIself) :: Range) ((_rightPatternIself) :: Pattern) ->
Pattern_InfixConstructor _rangeIself _leftPatternIself _constructorOperatorIself _rightPatternIself
rule2823 = \ _self ->
_self
rule2824 = \ _beta ->
_beta
rule2825 = \ ((_rightPatternIbetaUnique) :: Int) ->
_rightPatternIbetaUnique
rule2826 = \ _constraints ->
_constraints
rule2827 = \ ((_rightPatternIcounter) :: Int) ->
_rightPatternIcounter
rule2828 = \ ((_rightPatternIpatternMatchWarnings) :: [Warning]) ->
_rightPatternIpatternMatchWarnings
rule2829 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2830 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2831 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2832 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2833 = \ _parentTree ->
_parentTree
rule2834 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule2835 = \ ((_leftPatternIbetaUnique) :: Int) ->
_leftPatternIbetaUnique
rule2836 = \ ((_leftPatternIcounter) :: Int) ->
_leftPatternIcounter
rule2837 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2838 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2839 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2840 = \ _parentTree ->
_parentTree
rule2841 = \ ((_leftPatternIpatternMatchWarnings) :: [Warning]) ->
_leftPatternIpatternMatchWarnings
sem_Pattern_List :: T_Range -> T_Patterns -> T_Pattern
sem_Pattern_List arg_range_ arg_patterns_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_patternsX122 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_patterns_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Patterns_vOut121 _patternsIbetaUnique _patternsIbetas _patternsIconstraintslist _patternsIcounter _patternsIelementss _patternsIenvironment _patternsIinfoTrees _patternsInumberOfPatterns _patternsIpatVarNames _patternsIpatternMatchWarnings _patternsIself _patternsIunboundNames) = inv_Patterns_s122 _patternsX122 (T_Patterns_vIn121 _patternsObetaUnique _patternsOcounter _patternsOimportEnvironment _patternsOmonos _patternsOnamesInScope _patternsOparentTree _patternsOpatternMatchWarnings)
_patternsObetaUnique = rule2842 _lhsIbetaUnique
_constraints = rule2843 _newcon _patternsIbetas _patternsIconstraintslist _zipf
_beta = rule2844 _lhsIbetaUnique
_beta' = rule2845 _lhsIbetaUnique
_newcon = rule2846 _beta _beta' _cinfoResult
_zipf = rule2847 _beta' _cinfoElem
_cinfoElem = rule2848 _beta' _localInfo _parentTree _patternsIconstraintslist
_cinfoResult = rule2849 _parentTree
_localInfo = rule2850 _beta _lhsImonos _self
_parentTree = rule2851 _lhsIparentTree _localInfo _patternsIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2852 _parentTree
_lhsOelements :: [PatternElement]
_lhsOelements = rule2853 _patternsIelementss
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2854 _patternsIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2855 _patternsIunboundNames
_self = rule2856 _patternsIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2857 _self
_lhsObeta :: Tp
_lhsObeta = rule2858 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2859 _patternsIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2860 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2861 _patternsIcounter
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2862 _patternsIenvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2863 _patternsIpatternMatchWarnings
_patternsOcounter = rule2864 _lhsIcounter
_patternsOimportEnvironment = rule2865 _lhsIimportEnvironment
_patternsOmonos = rule2866 _lhsImonos
_patternsOnamesInScope = rule2867 _lhsInamesInScope
_patternsOparentTree = rule2868 _parentTree
_patternsOpatternMatchWarnings = rule2869 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2842 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 2
rule2843 = \ _newcon ((_patternsIbetas) :: Tps) ((_patternsIconstraintslist) :: ConstraintSets) _zipf ->
_newcon .>.
Node (zipWith3 _zipf _patternsIbetas [0..] _patternsIconstraintslist)
rule2844 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule2845 = \ ((_lhsIbetaUnique) :: Int) ->
TVar (_lhsIbetaUnique + 1)
rule2846 = \ _beta _beta' _cinfoResult ->
[ (listType _beta' .==. _beta) _cinfoResult ]
rule2847 = \ _beta' _cinfoElem ->
\tp elemNr ctree -> [ (tp .==. _beta') (_cinfoElem elemNr) ] .<. ctree
rule2848 = \ _beta' _localInfo _parentTree ((_patternsIconstraintslist) :: ConstraintSets) ->
\elemNr ->
childConstraint elemNr "element of pattern list" _parentTree $
[ HasTrustFactor 10.0 | length _patternsIconstraintslist < 2 ] ++
[ Unifier (head (ftv _beta')) ("pattern list", _localInfo, ordinal False (elemNr+1) ++ " element") ]
rule2849 = \ _parentTree ->
resultConstraint "pattern list" _parentTree
[ FolkloreConstraint ]
rule2850 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule2851 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ((_patternsIinfoTrees) :: InfoTrees) ->
node _lhsIparentTree _localInfo _patternsIinfoTrees
rule2852 = \ _parentTree ->
_parentTree
rule2853 = \ ((_patternsIelementss) :: [ [PatternElement] ]) ->
listPat _patternsIelementss
rule2854 = \ ((_patternsIpatVarNames) :: Names) ->
_patternsIpatVarNames
rule2855 = \ ((_patternsIunboundNames) :: Names) ->
_patternsIunboundNames
rule2856 = \ ((_patternsIself) :: Patterns) ((_rangeIself) :: Range) ->
Pattern_List _rangeIself _patternsIself
rule2857 = \ _self ->
_self
rule2858 = \ _beta ->
_beta
rule2859 = \ ((_patternsIbetaUnique) :: Int) ->
_patternsIbetaUnique
rule2860 = \ _constraints ->
_constraints
rule2861 = \ ((_patternsIcounter) :: Int) ->
_patternsIcounter
rule2862 = \ ((_patternsIenvironment) :: PatternAssumptions) ->
_patternsIenvironment
rule2863 = \ ((_patternsIpatternMatchWarnings) :: [Warning]) ->
_patternsIpatternMatchWarnings
rule2864 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2865 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2866 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2867 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2868 = \ _parentTree ->
_parentTree
rule2869 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_Tuple :: T_Range -> T_Patterns -> T_Pattern
sem_Pattern_Tuple arg_range_ arg_patterns_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_patternsX122 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_patterns_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Patterns_vOut121 _patternsIbetaUnique _patternsIbetas _patternsIconstraintslist _patternsIcounter _patternsIelementss _patternsIenvironment _patternsIinfoTrees _patternsInumberOfPatterns _patternsIpatVarNames _patternsIpatternMatchWarnings _patternsIself _patternsIunboundNames) = inv_Patterns_s122 _patternsX122 (T_Patterns_vIn121 _patternsObetaUnique _patternsOcounter _patternsOimportEnvironment _patternsOmonos _patternsOnamesInScope _patternsOparentTree _patternsOpatternMatchWarnings)
_patternsObetaUnique = rule2870 _lhsIbetaUnique
_constraints = rule2871 _newcon _patternsIconstraintslist
_beta = rule2872 _lhsIbetaUnique
_newcon = rule2873 _beta _cinfo _patternsIbetas
_cinfo = rule2874 _parentTree
_localInfo = rule2875 _beta _lhsImonos _self
_parentTree = rule2876 _lhsIparentTree _localInfo _patternsIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2877 _parentTree
_lhsOelements :: [PatternElement]
_lhsOelements = rule2878 _patternsIelementss _patternsIself
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2879 _patternsIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2880 _patternsIunboundNames
_self = rule2881 _patternsIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2882 _self
_lhsObeta :: Tp
_lhsObeta = rule2883 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2884 _patternsIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2885 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2886 _patternsIcounter
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2887 _patternsIenvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2888 _patternsIpatternMatchWarnings
_patternsOcounter = rule2889 _lhsIcounter
_patternsOimportEnvironment = rule2890 _lhsIimportEnvironment
_patternsOmonos = rule2891 _lhsImonos
_patternsOnamesInScope = rule2892 _lhsInamesInScope
_patternsOparentTree = rule2893 _parentTree
_patternsOpatternMatchWarnings = rule2894 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2870 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule2871 = \ _newcon ((_patternsIconstraintslist) :: ConstraintSets) ->
_newcon .>. Node _patternsIconstraintslist
rule2872 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule2873 = \ _beta _cinfo ((_patternsIbetas) :: Tps) ->
[ (tupleType _patternsIbetas .==. _beta) _cinfo ]
rule2874 = \ _parentTree ->
resultConstraint "pattern tuple" _parentTree
[ FolkloreConstraint ]
rule2875 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule2876 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ((_patternsIinfoTrees) :: InfoTrees) ->
node _lhsIparentTree _localInfo _patternsIinfoTrees
rule2877 = \ _parentTree ->
_parentTree
rule2878 = \ ((_patternsIelementss) :: [ [PatternElement] ]) ((_patternsIself) :: Patterns) ->
FiniteElement ("(" ++ replicate (length $ tail _patternsIself) ',' ++ ")") : concat _patternsIelementss
rule2879 = \ ((_patternsIpatVarNames) :: Names) ->
_patternsIpatVarNames
rule2880 = \ ((_patternsIunboundNames) :: Names) ->
_patternsIunboundNames
rule2881 = \ ((_patternsIself) :: Patterns) ((_rangeIself) :: Range) ->
Pattern_Tuple _rangeIself _patternsIself
rule2882 = \ _self ->
_self
rule2883 = \ _beta ->
_beta
rule2884 = \ ((_patternsIbetaUnique) :: Int) ->
_patternsIbetaUnique
rule2885 = \ _constraints ->
_constraints
rule2886 = \ ((_patternsIcounter) :: Int) ->
_patternsIcounter
rule2887 = \ ((_patternsIenvironment) :: PatternAssumptions) ->
_patternsIenvironment
rule2888 = \ ((_patternsIpatternMatchWarnings) :: [Warning]) ->
_patternsIpatternMatchWarnings
rule2889 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2890 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2891 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2892 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2893 = \ _parentTree ->
_parentTree
rule2894 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_Record :: T_Range -> T_Name -> T_RecordPatternBindings -> T_Pattern
sem_Pattern_Record arg_range_ arg_name_ arg_recordPatternBindings_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_recordPatternBindingsX146 = Control.Monad.Identity.runIdentity (attach_T_RecordPatternBindings (arg_recordPatternBindings_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_RecordPatternBindings_vOut145 _recordPatternBindingsIcounter _recordPatternBindingsIpatternMatchWarnings _recordPatternBindingsIself _recordPatternBindingsIunboundNames) = inv_RecordPatternBindings_s146 _recordPatternBindingsX146 (T_RecordPatternBindings_vIn145 _recordPatternBindingsOcounter _recordPatternBindingsOnamesInScope _recordPatternBindingsOpatternMatchWarnings)
_infoTree = rule2895 ()
(_beta,_constraints,_environment) = rule2896 ()
_lhsOelements :: [PatternElement]
_lhsOelements = rule2897 ()
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2898 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2899 _recordPatternBindingsIunboundNames
_self = rule2900 _nameIself _rangeIself _recordPatternBindingsIself
_lhsOself :: Pattern
_lhsOself = rule2901 _self
_lhsObeta :: Tp
_lhsObeta = rule2902 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2903 _lhsIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2904 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2905 _recordPatternBindingsIcounter
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2906 _environment
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2907 _infoTree
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2908 _recordPatternBindingsIpatternMatchWarnings
_recordPatternBindingsOcounter = rule2909 _lhsIcounter
_recordPatternBindingsOnamesInScope = rule2910 _lhsInamesInScope
_recordPatternBindingsOpatternMatchWarnings = rule2911 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2895 = \ (_ :: ()) ->
globalInfoError
rule2896 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "Pattern.Record"
rule2897 = \ (_ :: ()) ->
pmError "Pattern_Record.elements" "Records are not supported"
rule2898 = \ (_ :: ()) ->
[]
rule2899 = \ ((_recordPatternBindingsIunboundNames) :: Names) ->
_recordPatternBindingsIunboundNames
rule2900 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ((_recordPatternBindingsIself) :: RecordPatternBindings) ->
Pattern_Record _rangeIself _nameIself _recordPatternBindingsIself
rule2901 = \ _self ->
_self
rule2902 = \ _beta ->
_beta
rule2903 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2904 = \ _constraints ->
_constraints
rule2905 = \ ((_recordPatternBindingsIcounter) :: Int) ->
_recordPatternBindingsIcounter
rule2906 = \ _environment ->
_environment
rule2907 = \ _infoTree ->
_infoTree
rule2908 = \ ((_recordPatternBindingsIpatternMatchWarnings) :: [Warning]) ->
_recordPatternBindingsIpatternMatchWarnings
rule2909 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2910 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2911 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_Negate :: T_Range -> T_Literal -> T_Pattern
sem_Pattern_Negate arg_range_ arg_literal_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_literalX86 = Control.Monad.Identity.runIdentity (attach_T_Literal (arg_literal_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Literal_vOut85 _literalIelements _literalIliteralType _literalIself) = inv_Literal_s86 _literalX86 (T_Literal_vIn85 )
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2912 _lhsIbetaUnique
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2913 ()
_constraints = rule2914 _newcon
_beta = rule2915 _lhsIbetaUnique
_newcon = rule2916 _beta _cinfo _lhsIimportEnvironment _literalIliteralType
_cinfo = rule2917 _parentTree
_localInfo = rule2918 _beta _lhsImonos _self
_parentTree = rule2919 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2920 _parentTree
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2921 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2922 ()
_self = rule2923 _literalIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2924 _self
_lhsObeta :: Tp
_lhsObeta = rule2925 _beta
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2926 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2927 _lhsIcounter
_lhsOelements :: [PatternElement]
_lhsOelements = rule2928 _literalIelements
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2929 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2912 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule2913 = \ (_ :: ()) ->
noAssumptions
rule2914 = \ _newcon ->
listTree _newcon
rule2915 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule2916 = \ _beta _cinfo ((_lhsIimportEnvironment) :: ImportEnvironment) ((_literalIliteralType) :: Tp) ->
let standard = makeScheme [] [Predicate "Num" (TVar 0)] (TVar 0 .->. TVar 0)
tpscheme = M.findWithDefault standard (nameFromString "negate") (typeEnvironment _lhsIimportEnvironment)
in [ (_literalIliteralType .->. _beta .::. tpscheme) _cinfo]
rule2917 = \ _parentTree ->
resultConstraint "pattern negation" _parentTree
[ FolkloreConstraint ]
rule2918 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule2919 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule2920 = \ _parentTree ->
_parentTree
rule2921 = \ (_ :: ()) ->
[]
rule2922 = \ (_ :: ()) ->
[]
rule2923 = \ ((_literalIself) :: Literal) ((_rangeIself) :: Range) ->
Pattern_Negate _rangeIself _literalIself
rule2924 = \ _self ->
_self
rule2925 = \ _beta ->
_beta
rule2926 = \ _constraints ->
_constraints
rule2927 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2928 = \ ((_literalIelements) :: [PatternElement] ) ->
_literalIelements
rule2929 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_As :: T_Range -> T_Name -> T_Pattern -> T_Pattern
sem_Pattern_As arg_range_ arg_name_ arg_pattern_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_patternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_Pattern_vOut118 _patternIbeta _patternIbetaUnique _patternIconstraints _patternIcounter _patternIelements _patternIenvironment _patternIinfoTree _patternIpatVarNames _patternIpatternMatchWarnings _patternIself _patternIunboundNames) = inv_Pattern_s119 _patternX119 (T_Pattern_vIn118 _patternObetaUnique _patternOcounter _patternOimportEnvironment _patternOmonos _patternOnamesInScope _patternOparentTree _patternOpatternMatchWarnings)
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2930 _beta _nameIself _patternIenvironment
_patternObetaUnique = rule2931 _lhsIbetaUnique
_constraints = rule2932 _lhsIbetaUnique _newcon _patternIconstraints
_beta = rule2933 _lhsIbetaUnique
_newcon = rule2934 _beta _cinfo _patternIbeta
_cinfo = rule2935 _localInfo _nameIself _parentTree
_localInfo = rule2936 _beta _lhsImonos _self
_parentTree = rule2937 _lhsIparentTree _localInfo _patternIinfoTree
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2938 _parentTree
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2939 _nameIself _patternIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2940 _patternIunboundNames
_self = rule2941 _nameIself _patternIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2942 _self
_lhsObeta :: Tp
_lhsObeta = rule2943 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2944 _patternIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2945 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2946 _patternIcounter
_lhsOelements :: [PatternElement]
_lhsOelements = rule2947 _patternIelements
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2948 _patternIpatternMatchWarnings
_patternOcounter = rule2949 _lhsIcounter
_patternOimportEnvironment = rule2950 _lhsIimportEnvironment
_patternOmonos = rule2951 _lhsImonos
_patternOnamesInScope = rule2952 _lhsInamesInScope
_patternOparentTree = rule2953 _parentTree
_patternOpatternMatchWarnings = rule2954 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2930 = \ _beta ((_nameIself) :: Name) ((_patternIenvironment) :: PatternAssumptions) ->
M.insert _nameIself _beta _patternIenvironment
rule2931 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule2932 = \ ((_lhsIbetaUnique) :: Int) _newcon ((_patternIconstraints) :: ConstraintSet) ->
_newcon .>.
Node [ Receive _lhsIbetaUnique
, _patternIconstraints
]
rule2933 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule2934 = \ _beta _cinfo ((_patternIbeta) :: Tp) ->
[ (_beta .==. _patternIbeta) _cinfo ]
rule2935 = \ _localInfo ((_nameIself) :: Name) _parentTree ->
specialConstraint "as pattern" _parentTree
(self _localInfo, Just $ nameToUHA_Pat _nameIself)
[]
rule2936 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule2937 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ((_patternIinfoTree) :: InfoTree) ->
node _lhsIparentTree _localInfo [_patternIinfoTree]
rule2938 = \ _parentTree ->
_parentTree
rule2939 = \ ((_nameIself) :: Name) ((_patternIpatVarNames) :: Names) ->
_nameIself : _patternIpatVarNames
rule2940 = \ ((_patternIunboundNames) :: Names) ->
_patternIunboundNames
rule2941 = \ ((_nameIself) :: Name) ((_patternIself) :: Pattern) ((_rangeIself) :: Range) ->
Pattern_As _rangeIself _nameIself _patternIself
rule2942 = \ _self ->
_self
rule2943 = \ _beta ->
_beta
rule2944 = \ ((_patternIbetaUnique) :: Int) ->
_patternIbetaUnique
rule2945 = \ _constraints ->
_constraints
rule2946 = \ ((_patternIcounter) :: Int) ->
_patternIcounter
rule2947 = \ ((_patternIelements) :: [PatternElement] ) ->
_patternIelements
rule2948 = \ ((_patternIpatternMatchWarnings) :: [Warning]) ->
_patternIpatternMatchWarnings
rule2949 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2950 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2951 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2952 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2953 = \ _parentTree ->
_parentTree
rule2954 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_Wildcard :: T_Range -> T_Pattern
sem_Pattern_Wildcard arg_range_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2955 _lhsIbetaUnique
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2956 ()
_constraints = rule2957 ()
_beta = rule2958 _lhsIbetaUnique
_localInfo = rule2959 _beta _lhsImonos _self
_parentTree = rule2960 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2961 _parentTree
_lhsOelements :: [PatternElement]
_lhsOelements = rule2962 ()
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2963 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2964 ()
_self = rule2965 _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2966 _self
_lhsObeta :: Tp
_lhsObeta = rule2967 _beta
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2968 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule2969 _lhsIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2970 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2955 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule2956 = \ (_ :: ()) ->
noAssumptions
rule2957 = \ (_ :: ()) ->
emptyTree
rule2958 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule2959 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule2960 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule2961 = \ _parentTree ->
_parentTree
rule2962 = \ (_ :: ()) ->
[WildcardElement]
rule2963 = \ (_ :: ()) ->
[]
rule2964 = \ (_ :: ()) ->
[]
rule2965 = \ ((_rangeIself) :: Range) ->
Pattern_Wildcard _rangeIself
rule2966 = \ _self ->
_self
rule2967 = \ _beta ->
_beta
rule2968 = \ _constraints ->
_constraints
rule2969 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2970 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_Irrefutable :: T_Range -> T_Pattern -> T_Pattern
sem_Pattern_Irrefutable arg_range_ arg_pattern_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_patternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Pattern_vOut118 _patternIbeta _patternIbetaUnique _patternIconstraints _patternIcounter _patternIelements _patternIenvironment _patternIinfoTree _patternIpatVarNames _patternIpatternMatchWarnings _patternIself _patternIunboundNames) = inv_Pattern_s119 _patternX119 (T_Pattern_vIn118 _patternObetaUnique _patternOcounter _patternOimportEnvironment _patternOmonos _patternOnamesInScope _patternOparentTree _patternOpatternMatchWarnings)
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2971 _patternIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2972 _patternIunboundNames
_self = rule2973 _patternIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2974 _self
_lhsObeta :: Tp
_lhsObeta = rule2975 _patternIbeta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2976 _patternIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2977 _patternIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule2978 _patternIcounter
_lhsOelements :: [PatternElement]
_lhsOelements = rule2979 _patternIelements
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule2980 _patternIenvironment
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule2981 _patternIinfoTree
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule2982 _patternIpatternMatchWarnings
_patternObetaUnique = rule2983 _lhsIbetaUnique
_patternOcounter = rule2984 _lhsIcounter
_patternOimportEnvironment = rule2985 _lhsIimportEnvironment
_patternOmonos = rule2986 _lhsImonos
_patternOnamesInScope = rule2987 _lhsInamesInScope
_patternOparentTree = rule2988 _lhsIparentTree
_patternOpatternMatchWarnings = rule2989 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2971 = \ ((_patternIpatVarNames) :: Names) ->
_patternIpatVarNames
rule2972 = \ ((_patternIunboundNames) :: Names) ->
_patternIunboundNames
rule2973 = \ ((_patternIself) :: Pattern) ((_rangeIself) :: Range) ->
Pattern_Irrefutable _rangeIself _patternIself
rule2974 = \ _self ->
_self
rule2975 = \ ((_patternIbeta) :: Tp) ->
_patternIbeta
rule2976 = \ ((_patternIbetaUnique) :: Int) ->
_patternIbetaUnique
rule2977 = \ ((_patternIconstraints) :: ConstraintSet) ->
_patternIconstraints
rule2978 = \ ((_patternIcounter) :: Int) ->
_patternIcounter
rule2979 = \ ((_patternIelements) :: [PatternElement] ) ->
_patternIelements
rule2980 = \ ((_patternIenvironment) :: PatternAssumptions) ->
_patternIenvironment
rule2981 = \ ((_patternIinfoTree) :: InfoTree) ->
_patternIinfoTree
rule2982 = \ ((_patternIpatternMatchWarnings) :: [Warning]) ->
_patternIpatternMatchWarnings
rule2983 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2984 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule2985 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule2986 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule2987 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule2988 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule2989 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_Successor :: T_Range -> T_Name -> T_Literal -> T_Pattern
sem_Pattern_Successor arg_range_ arg_name_ arg_literal_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_literalX86 = Control.Monad.Identity.runIdentity (attach_T_Literal (arg_literal_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_Literal_vOut85 _literalIelements _literalIliteralType _literalIself) = inv_Literal_s86 _literalX86 (T_Literal_vIn85 )
_infoTree = rule2990 ()
(_beta,_constraints,_environment) = rule2991 ()
_lhsOelements :: [PatternElement]
_lhsOelements = rule2992 ()
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule2993 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule2994 ()
_self = rule2995 _literalIself _nameIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule2996 _self
_lhsObeta :: Tp
_lhsObeta = rule2997 _beta
_lhsObetaUnique :: Int
_lhsObetaUnique = rule2998 _lhsIbetaUnique
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule2999 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule3000 _lhsIcounter
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule3001 _environment
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3002 _infoTree
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3003 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule2990 = \ (_ :: ()) ->
globalInfoError
rule2991 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "Pattern.Successor"
rule2992 = \ (_ :: ()) ->
pmError "Pattern_Successor.elements" "Successors are not supported"
rule2993 = \ (_ :: ()) ->
[]
rule2994 = \ (_ :: ()) ->
[]
rule2995 = \ ((_literalIself) :: Literal) ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Pattern_Successor _rangeIself _nameIself _literalIself
rule2996 = \ _self ->
_self
rule2997 = \ _beta ->
_beta
rule2998 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule2999 = \ _constraints ->
_constraints
rule3000 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3001 = \ _environment ->
_environment
rule3002 = \ _infoTree ->
_infoTree
rule3003 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
sem_Pattern_NegateFloat :: T_Range -> T_Literal -> T_Pattern
sem_Pattern_NegateFloat arg_range_ arg_literal_ = T_Pattern (return st119) where
st119 = let
v118 :: T_Pattern_v118
v118 = \ (T_Pattern_vIn118 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_literalX86 = Control.Monad.Identity.runIdentity (attach_T_Literal (arg_literal_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Literal_vOut85 _literalIelements _literalIliteralType _literalIself) = inv_Literal_s86 _literalX86 (T_Literal_vIn85 )
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3004 _lhsIbetaUnique
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule3005 ()
_constraints = rule3006 _newcon
_beta = rule3007 _lhsIbetaUnique
_newcon = rule3008 _beta _cinfo
_cinfo = rule3009 _parentTree
_localInfo = rule3010 _beta _lhsImonos _self
_parentTree = rule3011 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3012 _parentTree
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule3013 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3014 ()
_self = rule3015 _literalIself _rangeIself
_lhsOself :: Pattern
_lhsOself = rule3016 _self
_lhsObeta :: Tp
_lhsObeta = rule3017 _beta
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3018 _constraints
_lhsOcounter :: Int
_lhsOcounter = rule3019 _lhsIcounter
_lhsOelements :: [PatternElement]
_lhsOelements = rule3020 _literalIelements
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3021 _lhsIpatternMatchWarnings
__result_ = T_Pattern_vOut118 _lhsObeta _lhsObetaUnique _lhsOconstraints _lhsOcounter _lhsOelements _lhsOenvironment _lhsOinfoTree _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Pattern_s119 v118
rule3004 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule3005 = \ (_ :: ()) ->
noAssumptions
rule3006 = \ _newcon ->
listTree _newcon
rule3007 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule3008 = \ _beta _cinfo ->
[ (floatType .==. _beta) _cinfo ]
rule3009 = \ _parentTree ->
resultConstraint "pattern negation" _parentTree
[ FolkloreConstraint ]
rule3010 = \ _beta ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Pat _self
, assignedType = Just _beta
, monos = _lhsImonos
}
rule3011 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule3012 = \ _parentTree ->
_parentTree
rule3013 = \ (_ :: ()) ->
[]
rule3014 = \ (_ :: ()) ->
[]
rule3015 = \ ((_literalIself) :: Literal) ((_rangeIself) :: Range) ->
Pattern_NegateFloat _rangeIself _literalIself
rule3016 = \ _self ->
_self
rule3017 = \ _beta ->
_beta
rule3018 = \ _constraints ->
_constraints
rule3019 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3020 = \ ((_literalIelements) :: [PatternElement] ) ->
_literalIelements
rule3021 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
data Inh_Patterns = Inh_Patterns { betaUnique_Inh_Patterns :: (Int), counter_Inh_Patterns :: (Int), importEnvironment_Inh_Patterns :: (ImportEnvironment), monos_Inh_Patterns :: (Monos), namesInScope_Inh_Patterns :: (Names), parentTree_Inh_Patterns :: (InfoTree), patternMatchWarnings_Inh_Patterns :: ([Warning]) }
data Syn_Patterns = Syn_Patterns { betaUnique_Syn_Patterns :: (Int), betas_Syn_Patterns :: (Tps), constraintslist_Syn_Patterns :: (ConstraintSets), counter_Syn_Patterns :: (Int), elementss_Syn_Patterns :: ([ [PatternElement] ]), environment_Syn_Patterns :: (PatternAssumptions), infoTrees_Syn_Patterns :: (InfoTrees), numberOfPatterns_Syn_Patterns :: (Int), patVarNames_Syn_Patterns :: (Names), patternMatchWarnings_Syn_Patterns :: ([Warning]), self_Syn_Patterns :: (Patterns), unboundNames_Syn_Patterns :: (Names) }
wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )
wrap_Patterns (T_Patterns act) (Inh_Patterns _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Patterns_vIn121 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings
(T_Patterns_vOut121 _lhsObetaUnique _lhsObetas _lhsOconstraintslist _lhsOcounter _lhsOelementss _lhsOenvironment _lhsOinfoTrees _lhsOnumberOfPatterns _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames) <- return (inv_Patterns_s122 sem arg)
return (Syn_Patterns _lhsObetaUnique _lhsObetas _lhsOconstraintslist _lhsOcounter _lhsOelementss _lhsOenvironment _lhsOinfoTrees _lhsOnumberOfPatterns _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames)
)
sem_Patterns :: Patterns -> T_Patterns
sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)
newtype T_Patterns = T_Patterns {
attach_T_Patterns :: Identity (T_Patterns_s122 )
}
newtype T_Patterns_s122 = C_Patterns_s122 {
inv_Patterns_s122 :: (T_Patterns_v121 )
}
data T_Patterns_s123 = C_Patterns_s123
type T_Patterns_v121 = (T_Patterns_vIn121 ) -> (T_Patterns_vOut121 )
data T_Patterns_vIn121 = T_Patterns_vIn121 (Int) (Int) (ImportEnvironment) (Monos) (Names) (InfoTree) ([Warning])
data T_Patterns_vOut121 = T_Patterns_vOut121 (Int) (Tps) (ConstraintSets) (Int) ([ [PatternElement] ]) (PatternAssumptions) (InfoTrees) (Int) (Names) ([Warning]) (Patterns) (Names)
sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st122) where
st122 = let
v121 :: T_Patterns_v121
v121 = \ (T_Patterns_vIn121 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_hdX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))
_tlX122 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))
(T_Pattern_vOut118 _hdIbeta _hdIbetaUnique _hdIconstraints _hdIcounter _hdIelements _hdIenvironment _hdIinfoTree _hdIpatVarNames _hdIpatternMatchWarnings _hdIself _hdIunboundNames) = inv_Pattern_s119 _hdX119 (T_Pattern_vIn118 _hdObetaUnique _hdOcounter _hdOimportEnvironment _hdOmonos _hdOnamesInScope _hdOparentTree _hdOpatternMatchWarnings)
(T_Patterns_vOut121 _tlIbetaUnique _tlIbetas _tlIconstraintslist _tlIcounter _tlIelementss _tlIenvironment _tlIinfoTrees _tlInumberOfPatterns _tlIpatVarNames _tlIpatternMatchWarnings _tlIself _tlIunboundNames) = inv_Patterns_s122 _tlX122 (T_Patterns_vIn121 _tlObetaUnique _tlOcounter _tlOimportEnvironment _tlOmonos _tlOnamesInScope _tlOparentTree _tlOpatternMatchWarnings)
_lhsObetas :: Tps
_lhsObetas = rule3022 _hdIbeta _tlIbetas
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule3023 _hdIenvironment _tlIenvironment
_lhsOnumberOfPatterns :: Int
_lhsOnumberOfPatterns = rule3024 _tlInumberOfPatterns
_lhsOconstraintslist :: ConstraintSets
_lhsOconstraintslist = rule3025 _hdIconstraints _tlIconstraintslist
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule3026 _hdIinfoTree _tlIinfoTrees
_lhsOelementss :: [ [PatternElement] ]
_lhsOelementss = rule3027 _hdIelements _tlIelementss
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule3028 _hdIpatVarNames _tlIpatVarNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3029 _hdIunboundNames _tlIunboundNames
_self = rule3030 _hdIself _tlIself
_lhsOself :: Patterns
_lhsOself = rule3031 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3032 _tlIbetaUnique
_lhsOcounter :: Int
_lhsOcounter = rule3033 _tlIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3034 _tlIpatternMatchWarnings
_hdObetaUnique = rule3035 _lhsIbetaUnique
_hdOcounter = rule3036 _lhsIcounter
_hdOimportEnvironment = rule3037 _lhsIimportEnvironment
_hdOmonos = rule3038 _lhsImonos
_hdOnamesInScope = rule3039 _lhsInamesInScope
_hdOparentTree = rule3040 _lhsIparentTree
_hdOpatternMatchWarnings = rule3041 _lhsIpatternMatchWarnings
_tlObetaUnique = rule3042 _hdIbetaUnique
_tlOcounter = rule3043 _hdIcounter
_tlOimportEnvironment = rule3044 _lhsIimportEnvironment
_tlOmonos = rule3045 _lhsImonos
_tlOnamesInScope = rule3046 _lhsInamesInScope
_tlOparentTree = rule3047 _lhsIparentTree
_tlOpatternMatchWarnings = rule3048 _hdIpatternMatchWarnings
__result_ = T_Patterns_vOut121 _lhsObetaUnique _lhsObetas _lhsOconstraintslist _lhsOcounter _lhsOelementss _lhsOenvironment _lhsOinfoTrees _lhsOnumberOfPatterns _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Patterns_s122 v121
rule3022 = \ ((_hdIbeta) :: Tp) ((_tlIbetas) :: Tps) ->
_hdIbeta : _tlIbetas
rule3023 = \ ((_hdIenvironment) :: PatternAssumptions) ((_tlIenvironment) :: PatternAssumptions) ->
_hdIenvironment `M.union` _tlIenvironment
rule3024 = \ ((_tlInumberOfPatterns) :: Int) ->
1 + _tlInumberOfPatterns
rule3025 = \ ((_hdIconstraints) :: ConstraintSet) ((_tlIconstraintslist) :: ConstraintSets) ->
_hdIconstraints : _tlIconstraintslist
rule3026 = \ ((_hdIinfoTree) :: InfoTree) ((_tlIinfoTrees) :: InfoTrees) ->
_hdIinfoTree : _tlIinfoTrees
rule3027 = \ ((_hdIelements) :: [PatternElement] ) ((_tlIelementss) :: [ [PatternElement] ]) ->
_hdIelements : _tlIelementss
rule3028 = \ ((_hdIpatVarNames) :: Names) ((_tlIpatVarNames) :: Names) ->
_hdIpatVarNames ++ _tlIpatVarNames
rule3029 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule3030 = \ ((_hdIself) :: Pattern) ((_tlIself) :: Patterns) ->
(:) _hdIself _tlIself
rule3031 = \ _self ->
_self
rule3032 = \ ((_tlIbetaUnique) :: Int) ->
_tlIbetaUnique
rule3033 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule3034 = \ ((_tlIpatternMatchWarnings) :: [Warning]) ->
_tlIpatternMatchWarnings
rule3035 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3036 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3037 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3038 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3039 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3040 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule3041 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3042 = \ ((_hdIbetaUnique) :: Int) ->
_hdIbetaUnique
rule3043 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule3044 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3045 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3046 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3047 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule3048 = \ ((_hdIpatternMatchWarnings) :: [Warning]) ->
_hdIpatternMatchWarnings
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil = T_Patterns (return st122) where
st122 = let
v121 :: T_Patterns_v121
v121 = \ (T_Patterns_vIn121 _lhsIbetaUnique _lhsIcounter _lhsIimportEnvironment _lhsImonos _lhsInamesInScope _lhsIparentTree _lhsIpatternMatchWarnings) -> ( let
_lhsObetas :: Tps
_lhsObetas = rule3049 ()
_lhsOenvironment :: PatternAssumptions
_lhsOenvironment = rule3050 ()
_lhsOnumberOfPatterns :: Int
_lhsOnumberOfPatterns = rule3051 ()
_lhsOconstraintslist :: ConstraintSets
_lhsOconstraintslist = rule3052 ()
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule3053 ()
_lhsOelementss :: [ [PatternElement] ]
_lhsOelementss = rule3054 ()
_lhsOpatVarNames :: Names
_lhsOpatVarNames = rule3055 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3056 ()
_self = rule3057 ()
_lhsOself :: Patterns
_lhsOself = rule3058 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3059 _lhsIbetaUnique
_lhsOcounter :: Int
_lhsOcounter = rule3060 _lhsIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3061 _lhsIpatternMatchWarnings
__result_ = T_Patterns_vOut121 _lhsObetaUnique _lhsObetas _lhsOconstraintslist _lhsOcounter _lhsOelementss _lhsOenvironment _lhsOinfoTrees _lhsOnumberOfPatterns _lhsOpatVarNames _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_Patterns_s122 v121
rule3049 = \ (_ :: ()) ->
[]
rule3050 = \ (_ :: ()) ->
noAssumptions
rule3051 = \ (_ :: ()) ->
0
rule3052 = \ (_ :: ()) ->
[]
rule3053 = \ (_ :: ()) ->
[]
rule3054 = \ (_ :: ()) ->
[]
rule3055 = \ (_ :: ()) ->
[]
rule3056 = \ (_ :: ()) ->
[]
rule3057 = \ (_ :: ()) ->
[]
rule3058 = \ _self ->
_self
rule3059 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3060 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3061 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
data Inh_Position = Inh_Position { }
data Syn_Position = Syn_Position { self_Syn_Position :: (Position) }
wrap_Position :: T_Position -> Inh_Position -> (Syn_Position )
wrap_Position (T_Position act) (Inh_Position ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Position_vIn124
(T_Position_vOut124 _lhsOself) <- return (inv_Position_s125 sem arg)
return (Syn_Position _lhsOself)
)
sem_Position :: Position -> T_Position
sem_Position ( Position_Position filename_ line_ column_ ) = sem_Position_Position filename_ line_ column_
sem_Position ( Position_Unknown ) = sem_Position_Unknown
newtype T_Position = T_Position {
attach_T_Position :: Identity (T_Position_s125 )
}
newtype T_Position_s125 = C_Position_s125 {
inv_Position_s125 :: (T_Position_v124 )
}
data T_Position_s126 = C_Position_s126
type T_Position_v124 = (T_Position_vIn124 ) -> (T_Position_vOut124 )
data T_Position_vIn124 = T_Position_vIn124
data T_Position_vOut124 = T_Position_vOut124 (Position)
sem_Position_Position :: (String) -> (Int) -> (Int) -> T_Position
sem_Position_Position arg_filename_ arg_line_ arg_column_ = T_Position (return st125) where
st125 = let
v124 :: T_Position_v124
v124 = \ (T_Position_vIn124 ) -> ( let
_self = rule3062 arg_column_ arg_filename_ arg_line_
_lhsOself :: Position
_lhsOself = rule3063 _self
__result_ = T_Position_vOut124 _lhsOself
in __result_ )
in C_Position_s125 v124
rule3062 = \ column_ filename_ line_ ->
Position_Position filename_ line_ column_
rule3063 = \ _self ->
_self
sem_Position_Unknown :: T_Position
sem_Position_Unknown = T_Position (return st125) where
st125 = let
v124 :: T_Position_v124
v124 = \ (T_Position_vIn124 ) -> ( let
_self = rule3064 ()
_lhsOself :: Position
_lhsOself = rule3065 _self
__result_ = T_Position_vOut124 _lhsOself
in __result_ )
in C_Position_s125 v124
rule3064 = \ (_ :: ()) ->
Position_Unknown
rule3065 = \ _self ->
_self
data Inh_Qualifier = Inh_Qualifier { allPatterns_Inh_Qualifier :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Qualifier :: (M.Map NameWithRange TpScheme), assumptions_Inh_Qualifier :: (Assumptions), availablePredicates_Inh_Qualifier :: (Predicates), betaUnique_Inh_Qualifier :: (Int), classEnvironment_Inh_Qualifier :: (ClassEnvironment), collectErrors_Inh_Qualifier :: (TypeErrors), collectWarnings_Inh_Qualifier :: (Warnings), constraints_Inh_Qualifier :: (ConstraintSet), counter_Inh_Qualifier :: (Int), currentChunk_Inh_Qualifier :: (Int), dictionaryEnvironment_Inh_Qualifier :: (DictionaryEnvironment), importEnvironment_Inh_Qualifier :: (ImportEnvironment), matchIO_Inh_Qualifier :: (IO ()), monos_Inh_Qualifier :: (Monos), namesInScope_Inh_Qualifier :: (Names), orderedTypeSynonyms_Inh_Qualifier :: (OrderedTypeSynonyms), parentTree_Inh_Qualifier :: (InfoTree), patternMatchWarnings_Inh_Qualifier :: ([Warning]), substitution_Inh_Qualifier :: (FixpointSubstitution), typeschemeMap_Inh_Qualifier :: (M.Map Int (Scheme Predicates)), unboundNames_Inh_Qualifier :: (Names), uniqueChunk_Inh_Qualifier :: (Int), uniqueSecondRound_Inh_Qualifier :: (Int) }
data Syn_Qualifier = Syn_Qualifier { assumptions_Syn_Qualifier :: (Assumptions), betaUnique_Syn_Qualifier :: (Int), collectErrors_Syn_Qualifier :: (TypeErrors), collectInstances_Syn_Qualifier :: ([(Name, Instance)]), collectWarnings_Syn_Qualifier :: (Warnings), constraints_Syn_Qualifier :: (ConstraintSet), counter_Syn_Qualifier :: (Int), dictionaryEnvironment_Syn_Qualifier :: (DictionaryEnvironment), infoTree_Syn_Qualifier :: (InfoTree), matchIO_Syn_Qualifier :: (IO ()), monos_Syn_Qualifier :: (Monos), namesInScope_Syn_Qualifier :: (Names), patternMatchWarnings_Syn_Qualifier :: ([Warning]), self_Syn_Qualifier :: (Qualifier), unboundNames_Syn_Qualifier :: (Names), uniqueChunk_Syn_Qualifier :: (Int), uniqueSecondRound_Syn_Qualifier :: (Int) }
wrap_Qualifier :: T_Qualifier -> Inh_Qualifier -> (Syn_Qualifier )
wrap_Qualifier (T_Qualifier act) (Inh_Qualifier _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Qualifier_vIn127 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound
(T_Qualifier_vOut127 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound) <- return (inv_Qualifier_s128 sem arg)
return (Syn_Qualifier _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound)
)
sem_Qualifier :: Qualifier -> T_Qualifier
sem_Qualifier ( Qualifier_Guard range_ guard_ ) = sem_Qualifier_Guard ( sem_Range range_ ) ( sem_Expression guard_ )
sem_Qualifier ( Qualifier_Let range_ declarations_ ) = sem_Qualifier_Let ( sem_Range range_ ) ( sem_Declarations declarations_ )
sem_Qualifier ( Qualifier_Generator range_ pattern_ expression_ ) = sem_Qualifier_Generator ( sem_Range range_ ) ( sem_Pattern pattern_ ) ( sem_Expression expression_ )
sem_Qualifier ( Qualifier_Empty range_ ) = sem_Qualifier_Empty ( sem_Range range_ )
newtype T_Qualifier = T_Qualifier {
attach_T_Qualifier :: Identity (T_Qualifier_s128 )
}
newtype T_Qualifier_s128 = C_Qualifier_s128 {
inv_Qualifier_s128 :: (T_Qualifier_v127 )
}
data T_Qualifier_s129 = C_Qualifier_s129
type T_Qualifier_v127 = (T_Qualifier_vIn127 ) -> (T_Qualifier_vOut127 )
data T_Qualifier_vIn127 = T_Qualifier_vIn127 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Assumptions) (Predicates) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (ConstraintSet) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Names) (Int) (Int)
data T_Qualifier_vOut127 = T_Qualifier_vOut127 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) (InfoTree) (IO ()) (Monos) (Names) ([Warning]) (Qualifier) (Names) (Int) (Int)
sem_Qualifier_Guard :: T_Range -> T_Expression -> T_Qualifier
sem_Qualifier_Guard arg_range_ arg_guard_ = T_Qualifier (return st128) where
st128 = let
v127 :: T_Qualifier_v127
v127 = \ (T_Qualifier_vIn127 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_guardX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_guard_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _guardIassumptions _guardIbeta _guardIbetaUnique _guardIcollectErrors _guardIcollectInstances _guardIcollectWarnings _guardIconstraints _guardIcounter _guardIdictionaryEnvironment _guardIinfoTree _guardImatchIO _guardImatches _guardIpatternMatchWarnings _guardIself _guardIunboundNames _guardIuniqueChunk _guardIuniqueSecondRound) = inv_Expression_s41 _guardX41 (T_Expression_vIn40 _guardOallPatterns _guardOallTypeSchemes _guardOavailablePredicates _guardObetaUnique _guardOclassEnvironment _guardOcollectErrors _guardOcollectWarnings _guardOcounter _guardOcurrentChunk _guardOdictionaryEnvironment _guardOimportEnvironment _guardOmatchIO _guardOmonos _guardOnamesInScope _guardOorderedTypeSynonyms _guardOparentTree _guardOpatternMatchWarnings _guardOsubstitution _guardOtryPatterns _guardOtypeschemeMap _guardOuniqueChunk _guardOuniqueSecondRound)
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3066 _guardIassumptions _lhsIassumptions
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3067 _locConstraints
_locConstraints = rule3068 _guardIconstraints _lhsIconstraints _newcon
_newcon = rule3069 _cinfo _guardIbeta
_cinfo = rule3070 _parentTree
_localInfo = rule3071 _lhsImonos _self
_parentTree = rule3072 _guardIinfoTree _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3073 _parentTree
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3074 _guardIunboundNames _lhsIunboundNames
_guardOtryPatterns = rule3075 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3076 _guardIcollectInstances
_self = rule3077 _guardIself _rangeIself
_lhsOself :: Qualifier
_lhsOself = rule3078 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3079 _guardIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3080 _guardIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3081 _guardIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3082 _guardIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3083 _guardIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3084 _guardImatchIO
_lhsOmonos :: Monos
_lhsOmonos = rule3085 _lhsImonos
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3086 _lhsInamesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3087 _guardIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3088 _guardIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3089 _guardIuniqueSecondRound
_guardOallPatterns = rule3090 _lhsIallPatterns
_guardOallTypeSchemes = rule3091 _lhsIallTypeSchemes
_guardOavailablePredicates = rule3092 _lhsIavailablePredicates
_guardObetaUnique = rule3093 _lhsIbetaUnique
_guardOclassEnvironment = rule3094 _lhsIclassEnvironment
_guardOcollectErrors = rule3095 _lhsIcollectErrors
_guardOcollectWarnings = rule3096 _lhsIcollectWarnings
_guardOcounter = rule3097 _lhsIcounter
_guardOcurrentChunk = rule3098 _lhsIcurrentChunk
_guardOdictionaryEnvironment = rule3099 _lhsIdictionaryEnvironment
_guardOimportEnvironment = rule3100 _lhsIimportEnvironment
_guardOmatchIO = rule3101 _lhsImatchIO
_guardOmonos = rule3102 _lhsImonos
_guardOnamesInScope = rule3103 _lhsInamesInScope
_guardOorderedTypeSynonyms = rule3104 _lhsIorderedTypeSynonyms
_guardOparentTree = rule3105 _parentTree
_guardOpatternMatchWarnings = rule3106 _lhsIpatternMatchWarnings
_guardOsubstitution = rule3107 _lhsIsubstitution
_guardOtypeschemeMap = rule3108 _lhsItypeschemeMap
_guardOuniqueChunk = rule3109 _lhsIuniqueChunk
_guardOuniqueSecondRound = rule3110 _lhsIuniqueSecondRound
__result_ = T_Qualifier_vOut127 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Qualifier_s128 v127
rule3066 = \ ((_guardIassumptions) :: Assumptions) ((_lhsIassumptions) :: Assumptions) ->
_lhsIassumptions `combine` _guardIassumptions
rule3067 = \ _locConstraints ->
_locConstraints
rule3068 = \ ((_guardIconstraints) :: ConstraintSet) ((_lhsIconstraints) :: ConstraintSet) _newcon ->
Node [ _newcon .<. _guardIconstraints
, _lhsIconstraints
]
rule3069 = \ _cinfo ((_guardIbeta) :: Tp) ->
[ (_guardIbeta .==. boolType) _cinfo ]
rule3070 = \ _parentTree ->
orphanConstraint 0 "boolean qualifier" _parentTree
[]
rule3071 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Qual _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule3072 = \ ((_guardIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo [_guardIinfoTree]
rule3073 = \ _parentTree ->
_parentTree
rule3074 = \ ((_guardIunboundNames) :: Names) ((_lhsIunboundNames) :: Names) ->
_guardIunboundNames ++ _lhsIunboundNames
rule3075 = \ (_ :: ()) ->
[]
rule3076 = \ ((_guardIcollectInstances) :: [(Name, Instance)]) ->
_guardIcollectInstances
rule3077 = \ ((_guardIself) :: Expression) ((_rangeIself) :: Range) ->
Qualifier_Guard _rangeIself _guardIself
rule3078 = \ _self ->
_self
rule3079 = \ ((_guardIbetaUnique) :: Int) ->
_guardIbetaUnique
rule3080 = \ ((_guardIcollectErrors) :: TypeErrors) ->
_guardIcollectErrors
rule3081 = \ ((_guardIcollectWarnings) :: Warnings) ->
_guardIcollectWarnings
rule3082 = \ ((_guardIcounter) :: Int) ->
_guardIcounter
rule3083 = \ ((_guardIdictionaryEnvironment) :: DictionaryEnvironment) ->
_guardIdictionaryEnvironment
rule3084 = \ ((_guardImatchIO) :: IO ()) ->
_guardImatchIO
rule3085 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3086 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3087 = \ ((_guardIpatternMatchWarnings) :: [Warning]) ->
_guardIpatternMatchWarnings
rule3088 = \ ((_guardIuniqueChunk) :: Int) ->
_guardIuniqueChunk
rule3089 = \ ((_guardIuniqueSecondRound) :: Int) ->
_guardIuniqueSecondRound
rule3090 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3091 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3092 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3093 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3094 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3095 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3096 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3097 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3098 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3099 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3100 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3101 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3102 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3103 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3104 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3105 = \ _parentTree ->
_parentTree
rule3106 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3107 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3108 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3109 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3110 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Qualifier_Let :: T_Range -> T_Declarations -> T_Qualifier
sem_Qualifier_Let arg_range_ arg_declarations_ = T_Qualifier (return st128) where
st128 = let
v127 :: T_Qualifier_v127
v127 = \ (T_Qualifier_vIn127 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_declarationsX32 = Control.Monad.Identity.runIdentity (attach_T_Declarations (arg_declarations_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Declarations_vOut31 _declarationsIbetaUnique _declarationsIbindingGroups _declarationsIcollectErrors _declarationsIcollectInstances _declarationsIcollectWarnings _declarationsIcounter _declarationsIdeclVarNames _declarationsIdictionaryEnvironment _declarationsIinfoTrees _declarationsImatchIO _declarationsIpatternMatchWarnings _declarationsIrestrictedNames _declarationsIself _declarationsIsimplePatNames _declarationsItypeSignatures _declarationsIunboundNames _declarationsIuniqueChunk) = inv_Declarations_s32 _declarationsX32 (T_Declarations_vIn31 _declarationsOallPatterns _declarationsOallTypeSchemes _declarationsOavailablePredicates _declarationsObetaUnique _declarationsObindingGroups _declarationsOclassEnvironment _declarationsOcollectErrors _declarationsOcollectWarnings _declarationsOcounter _declarationsOcurrentChunk _declarationsOdictionaryEnvironment _declarationsOimportEnvironment _declarationsOinheritedBDG _declarationsOmatchIO _declarationsOmonos _declarationsOnamesInScope _declarationsOorderedTypeSynonyms _declarationsOparentTree _declarationsOpatternMatchWarnings _declarationsOsubstitution _declarationsOtypeSignatures _declarationsOtypeschemeMap _declarationsOuniqueChunk)
_declarationsObindingGroups = rule3111 ()
_lhsOassumptions :: Assumptions
_lhsOconstraints :: ConstraintSet
_lhsObetaUnique :: Int
(_lhsOassumptions,_lhsOconstraints,_inheritedBDG,_chunkNr,_lhsObetaUnique,_implicitsFM) = rule3112 _declarationsIbetaUnique _declarationsIbindingGroups _declarationsItypeSignatures _declarationsIuniqueChunk _lhsIassumptions _lhsIconstraints _lhsIcurrentChunk _lhsImonos
_inferredTypes = rule3113 _implicitsFM _lhsItypeschemeMap
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3114 _declarationsIcollectWarnings _declarationsIsimplePatNames _inferredTypes
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3115 _declarationsIcollectErrors _declarationsIrestrictedNames _inferredTypes
_allTypeSchemes = rule3116 _lhsIallTypeSchemes _localTypes
_localTypes = rule3117 _declarationsIbindingGroups _declarationsItypeSignatures _inferredTypes
_declarationsOtypeSignatures = rule3118 ()
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3119 _chunkNr
_localInfo = rule3120 _lhsImonos _self
_declInfo = rule3121 _declarationsIself _lhsImonos
_thisTree = rule3122 _declTree _lhsIparentTree _localInfo
_declTree = rule3123 _declInfo _declarationsIinfoTrees _thisTree
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3124 _thisTree
_declarationsOparentTree = rule3125 _declTree
(_collectTypeConstructors,_collectValueConstructors,_collectTypeSynonyms,_collectConstructorEnv,_derivedFunctions,_operatorFixities) = rule3126 ()
(_namesInScope,_unboundNames,_scopeInfo) = rule3127 _declarationsIdeclVarNames _declarationsIunboundNames _lhsInamesInScope _lhsIunboundNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3128 _unboundNames
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3129 _declarationsIcollectInstances
_self = rule3130 _declarationsIself _rangeIself
_lhsOself :: Qualifier
_lhsOself = rule3131 _self
_lhsOcounter :: Int
_lhsOcounter = rule3132 _declarationsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3133 _declarationsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3134 _declarationsImatchIO
_lhsOmonos :: Monos
_lhsOmonos = rule3135 _lhsImonos
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3136 _namesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3137 _declarationsIpatternMatchWarnings
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3138 _lhsIuniqueSecondRound
_declarationsOallPatterns = rule3139 _lhsIallPatterns
_declarationsOallTypeSchemes = rule3140 _allTypeSchemes
_declarationsOavailablePredicates = rule3141 _lhsIavailablePredicates
_declarationsObetaUnique = rule3142 _lhsIbetaUnique
_declarationsOclassEnvironment = rule3143 _lhsIclassEnvironment
_declarationsOcollectErrors = rule3144 _lhsIcollectErrors
_declarationsOcollectWarnings = rule3145 _lhsIcollectWarnings
_declarationsOcounter = rule3146 _lhsIcounter
_declarationsOcurrentChunk = rule3147 _lhsIcurrentChunk
_declarationsOdictionaryEnvironment = rule3148 _lhsIdictionaryEnvironment
_declarationsOimportEnvironment = rule3149 _lhsIimportEnvironment
_declarationsOinheritedBDG = rule3150 _inheritedBDG
_declarationsOmatchIO = rule3151 _lhsImatchIO
_declarationsOmonos = rule3152 _lhsImonos
_declarationsOnamesInScope = rule3153 _namesInScope
_declarationsOorderedTypeSynonyms = rule3154 _lhsIorderedTypeSynonyms
_declarationsOpatternMatchWarnings = rule3155 _lhsIpatternMatchWarnings
_declarationsOsubstitution = rule3156 _lhsIsubstitution
_declarationsOtypeschemeMap = rule3157 _lhsItypeschemeMap
_declarationsOuniqueChunk = rule3158 _lhsIuniqueChunk
__result_ = T_Qualifier_vOut127 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Qualifier_s128 v127
rule3111 = \ (_ :: ()) ->
[]
rule3112 = \ ((_declarationsIbetaUnique) :: Int) ((_declarationsIbindingGroups) :: BindingGroups) ((_declarationsItypeSignatures) :: TypeEnvironment) ((_declarationsIuniqueChunk) :: Int) ((_lhsIassumptions) :: Assumptions) ((_lhsIconstraints) :: ConstraintSet) ((_lhsIcurrentChunk) :: Int) ((_lhsImonos) :: Monos) ->
let inputBDG = (False, _lhsIcurrentChunk, _declarationsIuniqueChunk, _lhsImonos, _declarationsItypeSignatures, mybdggroup, _declarationsIbetaUnique)
mybdggroup = Just (_lhsIassumptions, [_lhsIconstraints])
in performBindingGroup inputBDG _declarationsIbindingGroups
rule3113 = \ _implicitsFM ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
findInferredTypes _lhsItypeschemeMap _implicitsFM
rule3114 = \ ((_declarationsIcollectWarnings) :: Warnings) ((_declarationsIsimplePatNames) :: Names) _inferredTypes ->
missingTypeSignature False _declarationsIsimplePatNames _inferredTypes
++ _declarationsIcollectWarnings
rule3115 = \ ((_declarationsIcollectErrors) :: TypeErrors) ((_declarationsIrestrictedNames) :: Names) _inferredTypes ->
restrictedNameErrors _inferredTypes _declarationsIrestrictedNames
++ _declarationsIcollectErrors
rule3116 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) _localTypes ->
_localTypes `M.union` _lhsIallTypeSchemes
rule3117 = \ ((_declarationsIbindingGroups) :: BindingGroups) ((_declarationsItypeSignatures) :: TypeEnvironment) _inferredTypes ->
makeLocalTypeEnv (_declarationsItypeSignatures `M.union` _inferredTypes) _declarationsIbindingGroups
rule3118 = \ (_ :: ()) ->
M.empty
rule3119 = \ _chunkNr ->
_chunkNr
rule3120 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Qual _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule3121 = \ ((_declarationsIself) :: Declarations) ((_lhsImonos) :: Monos) ->
LocalInfo { self = UHA_Decls _declarationsIself
, assignedType = Nothing
, monos = _lhsImonos
}
rule3122 = \ _declTree ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo [_declTree]
rule3123 = \ _declInfo ((_declarationsIinfoTrees) :: InfoTrees) _thisTree ->
node _thisTree _declInfo _declarationsIinfoTrees
rule3124 = \ _thisTree ->
_thisTree
rule3125 = \ _declTree ->
_declTree
rule3126 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "toplevel Qualifier"
rule3127 = \ ((_declarationsIdeclVarNames) :: Names) ((_declarationsIunboundNames) :: Names) ((_lhsInamesInScope) :: Names) ((_lhsIunboundNames) :: Names) ->
changeOfScope _declarationsIdeclVarNames (_declarationsIunboundNames ++ _lhsIunboundNames) _lhsInamesInScope
rule3128 = \ _unboundNames ->
_unboundNames
rule3129 = \ ((_declarationsIcollectInstances) :: [(Name, Instance)]) ->
_declarationsIcollectInstances
rule3130 = \ ((_declarationsIself) :: Declarations) ((_rangeIself) :: Range) ->
Qualifier_Let _rangeIself _declarationsIself
rule3131 = \ _self ->
_self
rule3132 = \ ((_declarationsIcounter) :: Int) ->
_declarationsIcounter
rule3133 = \ ((_declarationsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_declarationsIdictionaryEnvironment
rule3134 = \ ((_declarationsImatchIO) :: IO ()) ->
_declarationsImatchIO
rule3135 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3136 = \ _namesInScope ->
_namesInScope
rule3137 = \ ((_declarationsIpatternMatchWarnings) :: [Warning]) ->
_declarationsIpatternMatchWarnings
rule3138 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule3139 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3140 = \ _allTypeSchemes ->
_allTypeSchemes
rule3141 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3142 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3143 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3144 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3145 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3146 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3147 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3148 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3149 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3150 = \ _inheritedBDG ->
_inheritedBDG
rule3151 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3152 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3153 = \ _namesInScope ->
_namesInScope
rule3154 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3155 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3156 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3157 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3158 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Qualifier_Generator :: T_Range -> T_Pattern -> T_Expression -> T_Qualifier
sem_Qualifier_Generator arg_range_ arg_pattern_ arg_expression_ = T_Qualifier (return st128) where
st128 = let
v127 :: T_Qualifier_v127
v127 = \ (T_Qualifier_vIn127 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_patternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Pattern_vOut118 _patternIbeta _patternIbetaUnique _patternIconstraints _patternIcounter _patternIelements _patternIenvironment _patternIinfoTree _patternIpatVarNames _patternIpatternMatchWarnings _patternIself _patternIunboundNames) = inv_Pattern_s119 _patternX119 (T_Pattern_vIn118 _patternObetaUnique _patternOcounter _patternOimportEnvironment _patternOmonos _patternOnamesInScope _patternOparentTree _patternOpatternMatchWarnings)
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3159 _assumptions' _expressionIassumptions
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3160 _locConstraints
_lhsOmonos :: Monos
_lhsOmonos = rule3161 _csetBinds _lhsImonos _patternIenvironment
_locConstraints = rule3162 _csetBinds _expressionIconstraints _lhsIconstraints _newcon _patternIconstraints
(_csetBinds,_assumptions') = rule3163 _cinfoBind _lhsIassumptions _patternIenvironment
_newcon = rule3164 _cinfoResult _expressionIbeta _patternIbeta
_cinfoResult = rule3165 _parentTree
_cinfoBind = rule3166 _parentTree _patternIenvironment
_localInfo = rule3167 _lhsImonos _self
_parentTree = rule3168 _expressionIinfoTree _lhsIparentTree _localInfo _patternIinfoTree
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3169 _parentTree
(_namesInScope,_unboundNames,_scopeInfo) = rule3170 _expressionIunboundNames _lhsInamesInScope _lhsIunboundNames _patternIpatVarNames
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3171 _namesInScope
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3172 _unboundNames
_expressionOnamesInScope = rule3173 _lhsInamesInScope
_expressionOtryPatterns = rule3174 ()
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3175 _expressionIpatternMatchWarnings _lhsIimportEnvironment _lhsIsubstitution _patternIbeta _patternIelements _rangeIself
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3176 _expressionIcollectInstances
_self = rule3177 _expressionIself _patternIself _rangeIself
_lhsOself :: Qualifier
_lhsOself = rule3178 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3179 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3180 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3181 _expressionIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3182 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3183 _expressionIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3184 _expressionImatchIO
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3185 _expressionIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3186 _expressionIuniqueSecondRound
_patternObetaUnique = rule3187 _lhsIbetaUnique
_patternOcounter = rule3188 _lhsIcounter
_patternOimportEnvironment = rule3189 _lhsIimportEnvironment
_patternOmonos = rule3190 _lhsImonos
_patternOnamesInScope = rule3191 _namesInScope
_patternOparentTree = rule3192 _parentTree
_patternOpatternMatchWarnings = rule3193 _lhsIpatternMatchWarnings
_expressionOallPatterns = rule3194 _lhsIallPatterns
_expressionOallTypeSchemes = rule3195 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule3196 _lhsIavailablePredicates
_expressionObetaUnique = rule3197 _patternIbetaUnique
_expressionOclassEnvironment = rule3198 _lhsIclassEnvironment
_expressionOcollectErrors = rule3199 _lhsIcollectErrors
_expressionOcollectWarnings = rule3200 _lhsIcollectWarnings
_expressionOcounter = rule3201 _patternIcounter
_expressionOcurrentChunk = rule3202 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule3203 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule3204 _lhsIimportEnvironment
_expressionOmatchIO = rule3205 _lhsImatchIO
_expressionOmonos = rule3206 _lhsImonos
_expressionOorderedTypeSynonyms = rule3207 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule3208 _parentTree
_expressionOpatternMatchWarnings = rule3209 _patternIpatternMatchWarnings
_expressionOsubstitution = rule3210 _lhsIsubstitution
_expressionOtypeschemeMap = rule3211 _lhsItypeschemeMap
_expressionOuniqueChunk = rule3212 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule3213 _lhsIuniqueSecondRound
__result_ = T_Qualifier_vOut127 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Qualifier_s128 v127
rule3159 = \ _assumptions' ((_expressionIassumptions) :: Assumptions) ->
_assumptions' `combine` _expressionIassumptions
rule3160 = \ _locConstraints ->
_locConstraints
rule3161 = \ _csetBinds ((_lhsImonos) :: Monos) ((_patternIenvironment) :: PatternAssumptions) ->
M.elems _patternIenvironment ++ getMonos _csetBinds ++ _lhsImonos
rule3162 = \ _csetBinds ((_expressionIconstraints) :: ConstraintSet) ((_lhsIconstraints) :: ConstraintSet) _newcon ((_patternIconstraints) :: ConstraintSet) ->
_newcon .>. _csetBinds .>>.
Node [ _patternIconstraints
, _expressionIconstraints
, _lhsIconstraints
]
rule3163 = \ _cinfoBind ((_lhsIassumptions) :: Assumptions) ((_patternIenvironment) :: PatternAssumptions) ->
(_patternIenvironment .===. _lhsIassumptions) _cinfoBind
rule3164 = \ _cinfoResult ((_expressionIbeta) :: Tp) ((_patternIbeta) :: Tp) ->
[ (_expressionIbeta .==. listType _patternIbeta) _cinfoResult ]
rule3165 = \ _parentTree ->
childConstraint 1 "generator" _parentTree
[]
rule3166 = \ _parentTree ((_patternIenvironment) :: PatternAssumptions) ->
\name -> variableConstraint "variable" (nameToUHA_Expr name)
[ FolkloreConstraint
, makeUnifier name "generator" _patternIenvironment _parentTree
]
rule3167 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Qual _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule3168 = \ ((_expressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ((_patternIinfoTree) :: InfoTree) ->
node _lhsIparentTree _localInfo [_patternIinfoTree, _expressionIinfoTree]
rule3169 = \ _parentTree ->
_parentTree
rule3170 = \ ((_expressionIunboundNames) :: Names) ((_lhsInamesInScope) :: Names) ((_lhsIunboundNames) :: Names) ((_patternIpatVarNames) :: Names) ->
changeOfScope _patternIpatVarNames (_expressionIunboundNames ++ _lhsIunboundNames) _lhsInamesInScope
rule3171 = \ _namesInScope ->
_namesInScope
rule3172 = \ _unboundNames ->
_unboundNames
rule3173 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3174 = \ (_ :: ()) ->
[]
rule3175 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ((_lhsIimportEnvironment) :: ImportEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) ((_patternIbeta) :: Tp) ((_patternIelements) :: [PatternElement] ) ((_rangeIself) :: Range) ->
patternMatchWarnings _lhsIimportEnvironment
_lhsIsubstitution
_patternIbeta
(:[])
[(_patternIelements, False)]
_rangeIself
Nothing
False
[]
"generator"
"<-"
++ _expressionIpatternMatchWarnings
rule3176 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule3177 = \ ((_expressionIself) :: Expression) ((_patternIself) :: Pattern) ((_rangeIself) :: Range) ->
Qualifier_Generator _rangeIself _patternIself _expressionIself
rule3178 = \ _self ->
_self
rule3179 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule3180 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule3181 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule3182 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule3183 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule3184 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule3185 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule3186 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule3187 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3188 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3189 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3190 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3191 = \ _namesInScope ->
_namesInScope
rule3192 = \ _parentTree ->
_parentTree
rule3193 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3194 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3195 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3196 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3197 = \ ((_patternIbetaUnique) :: Int) ->
_patternIbetaUnique
rule3198 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3199 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3200 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3201 = \ ((_patternIcounter) :: Int) ->
_patternIcounter
rule3202 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3203 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3204 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3205 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3206 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3207 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3208 = \ _parentTree ->
_parentTree
rule3209 = \ ((_patternIpatternMatchWarnings) :: [Warning]) ->
_patternIpatternMatchWarnings
rule3210 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3211 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3212 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3213 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Qualifier_Empty :: T_Range -> T_Qualifier
sem_Qualifier_Empty arg_range_ = T_Qualifier (return st128) where
st128 = let
v127 :: T_Qualifier_v127
v127 = \ (T_Qualifier_vIn127 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_localInfo = rule3214 _lhsImonos _self
_parentTree = rule3215 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3216 _parentTree
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3217 ()
_self = rule3218 _rangeIself
_lhsOself :: Qualifier
_lhsOself = rule3219 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3220 _lhsIassumptions
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3221 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3222 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3223 _lhsIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3224 _lhsIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule3225 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3226 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3227 _lhsImatchIO
_lhsOmonos :: Monos
_lhsOmonos = rule3228 _lhsImonos
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3229 _lhsInamesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3230 _lhsIpatternMatchWarnings
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3231 _lhsIunboundNames
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3232 _lhsIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3233 _lhsIuniqueSecondRound
__result_ = T_Qualifier_vOut127 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Qualifier_s128 v127
rule3214 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Qual _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule3215 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule3216 = \ _parentTree ->
_parentTree
rule3217 = \ (_ :: ()) ->
[]
rule3218 = \ ((_rangeIself) :: Range) ->
Qualifier_Empty _rangeIself
rule3219 = \ _self ->
_self
rule3220 = \ ((_lhsIassumptions) :: Assumptions) ->
_lhsIassumptions
rule3221 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3222 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3223 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3224 = \ ((_lhsIconstraints) :: ConstraintSet) ->
_lhsIconstraints
rule3225 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3226 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3227 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3228 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3229 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3230 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3231 = \ ((_lhsIunboundNames) :: Names) ->
_lhsIunboundNames
rule3232 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3233 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
data Inh_Qualifiers = Inh_Qualifiers { allPatterns_Inh_Qualifiers :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Qualifiers :: (M.Map NameWithRange TpScheme), assumptions_Inh_Qualifiers :: (Assumptions), availablePredicates_Inh_Qualifiers :: (Predicates), betaUnique_Inh_Qualifiers :: (Int), classEnvironment_Inh_Qualifiers :: (ClassEnvironment), collectErrors_Inh_Qualifiers :: (TypeErrors), collectWarnings_Inh_Qualifiers :: (Warnings), constraints_Inh_Qualifiers :: (ConstraintSet), counter_Inh_Qualifiers :: (Int), currentChunk_Inh_Qualifiers :: (Int), dictionaryEnvironment_Inh_Qualifiers :: (DictionaryEnvironment), importEnvironment_Inh_Qualifiers :: (ImportEnvironment), matchIO_Inh_Qualifiers :: (IO ()), monos_Inh_Qualifiers :: (Monos), namesInScope_Inh_Qualifiers :: (Names), orderedTypeSynonyms_Inh_Qualifiers :: (OrderedTypeSynonyms), parentTree_Inh_Qualifiers :: (InfoTree), patternMatchWarnings_Inh_Qualifiers :: ([Warning]), substitution_Inh_Qualifiers :: (FixpointSubstitution), typeschemeMap_Inh_Qualifiers :: (M.Map Int (Scheme Predicates)), unboundNames_Inh_Qualifiers :: (Names), uniqueChunk_Inh_Qualifiers :: (Int), uniqueSecondRound_Inh_Qualifiers :: (Int) }
data Syn_Qualifiers = Syn_Qualifiers { assumptions_Syn_Qualifiers :: (Assumptions), betaUnique_Syn_Qualifiers :: (Int), collectErrors_Syn_Qualifiers :: (TypeErrors), collectInstances_Syn_Qualifiers :: ([(Name, Instance)]), collectWarnings_Syn_Qualifiers :: (Warnings), constraints_Syn_Qualifiers :: (ConstraintSet), counter_Syn_Qualifiers :: (Int), dictionaryEnvironment_Syn_Qualifiers :: (DictionaryEnvironment), infoTrees_Syn_Qualifiers :: (InfoTrees), matchIO_Syn_Qualifiers :: (IO ()), monos_Syn_Qualifiers :: (Monos), namesInScope_Syn_Qualifiers :: (Names), patternMatchWarnings_Syn_Qualifiers :: ([Warning]), self_Syn_Qualifiers :: (Qualifiers), unboundNames_Syn_Qualifiers :: (Names), uniqueChunk_Syn_Qualifiers :: (Int), uniqueSecondRound_Syn_Qualifiers :: (Int) }
wrap_Qualifiers :: T_Qualifiers -> Inh_Qualifiers -> (Syn_Qualifiers )
wrap_Qualifiers (T_Qualifiers act) (Inh_Qualifiers _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Qualifiers_vIn130 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound
(T_Qualifiers_vOut130 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound) <- return (inv_Qualifiers_s131 sem arg)
return (Syn_Qualifiers _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound)
)
sem_Qualifiers :: Qualifiers -> T_Qualifiers
sem_Qualifiers list = Prelude.foldr sem_Qualifiers_Cons sem_Qualifiers_Nil (Prelude.map sem_Qualifier list)
newtype T_Qualifiers = T_Qualifiers {
attach_T_Qualifiers :: Identity (T_Qualifiers_s131 )
}
newtype T_Qualifiers_s131 = C_Qualifiers_s131 {
inv_Qualifiers_s131 :: (T_Qualifiers_v130 )
}
data T_Qualifiers_s132 = C_Qualifiers_s132
type T_Qualifiers_v130 = (T_Qualifiers_vIn130 ) -> (T_Qualifiers_vOut130 )
data T_Qualifiers_vIn130 = T_Qualifiers_vIn130 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Assumptions) (Predicates) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (ConstraintSet) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Names) (Int) (Int)
data T_Qualifiers_vOut130 = T_Qualifiers_vOut130 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) (InfoTrees) (IO ()) (Monos) (Names) ([Warning]) (Qualifiers) (Names) (Int) (Int)
sem_Qualifiers_Cons :: T_Qualifier -> T_Qualifiers -> T_Qualifiers
sem_Qualifiers_Cons arg_hd_ arg_tl_ = T_Qualifiers (return st131) where
st131 = let
v130 :: T_Qualifiers_v130
v130 = \ (T_Qualifiers_vIn130 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_hdX128 = Control.Monad.Identity.runIdentity (attach_T_Qualifier (arg_hd_))
_tlX131 = Control.Monad.Identity.runIdentity (attach_T_Qualifiers (arg_tl_))
(T_Qualifier_vOut127 _hdIassumptions _hdIbetaUnique _hdIcollectErrors _hdIcollectInstances _hdIcollectWarnings _hdIconstraints _hdIcounter _hdIdictionaryEnvironment _hdIinfoTree _hdImatchIO _hdImonos _hdInamesInScope _hdIpatternMatchWarnings _hdIself _hdIunboundNames _hdIuniqueChunk _hdIuniqueSecondRound) = inv_Qualifier_s128 _hdX128 (T_Qualifier_vIn127 _hdOallPatterns _hdOallTypeSchemes _hdOassumptions _hdOavailablePredicates _hdObetaUnique _hdOclassEnvironment _hdOcollectErrors _hdOcollectWarnings _hdOconstraints _hdOcounter _hdOcurrentChunk _hdOdictionaryEnvironment _hdOimportEnvironment _hdOmatchIO _hdOmonos _hdOnamesInScope _hdOorderedTypeSynonyms _hdOparentTree _hdOpatternMatchWarnings _hdOsubstitution _hdOtypeschemeMap _hdOunboundNames _hdOuniqueChunk _hdOuniqueSecondRound)
(T_Qualifiers_vOut130 _tlIassumptions _tlIbetaUnique _tlIcollectErrors _tlIcollectInstances _tlIcollectWarnings _tlIconstraints _tlIcounter _tlIdictionaryEnvironment _tlIinfoTrees _tlImatchIO _tlImonos _tlInamesInScope _tlIpatternMatchWarnings _tlIself _tlIunboundNames _tlIuniqueChunk _tlIuniqueSecondRound) = inv_Qualifiers_s131 _tlX131 (T_Qualifiers_vIn130 _tlOallPatterns _tlOallTypeSchemes _tlOassumptions _tlOavailablePredicates _tlObetaUnique _tlOclassEnvironment _tlOcollectErrors _tlOcollectWarnings _tlOconstraints _tlOcounter _tlOcurrentChunk _tlOdictionaryEnvironment _tlOimportEnvironment _tlOmatchIO _tlOmonos _tlOnamesInScope _tlOorderedTypeSynonyms _tlOparentTree _tlOpatternMatchWarnings _tlOsubstitution _tlOtypeschemeMap _tlOunboundNames _tlOuniqueChunk _tlOuniqueSecondRound)
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3234 _hdIassumptions
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3235 _hdIconstraints
_hdOassumptions = rule3236 _tlIassumptions
_hdOconstraints = rule3237 _tlIconstraints
_tlOassumptions = rule3238 _lhsIassumptions
_tlOconstraints = rule3239 _lhsIconstraints
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule3240 _hdIinfoTree _tlIinfoTrees
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3241 _hdIunboundNames
_tlOunboundNames = rule3242 _lhsIunboundNames
_hdOunboundNames = rule3243 _tlIunboundNames
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3244 _hdIcollectInstances _tlIcollectInstances
_self = rule3245 _hdIself _tlIself
_lhsOself :: Qualifiers
_lhsOself = rule3246 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3247 _tlIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3248 _tlIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3249 _tlIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3250 _tlIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3251 _tlIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3252 _tlImatchIO
_lhsOmonos :: Monos
_lhsOmonos = rule3253 _tlImonos
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3254 _tlInamesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3255 _tlIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3256 _tlIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3257 _tlIuniqueSecondRound
_hdOallPatterns = rule3258 _lhsIallPatterns
_hdOallTypeSchemes = rule3259 _lhsIallTypeSchemes
_hdOavailablePredicates = rule3260 _lhsIavailablePredicates
_hdObetaUnique = rule3261 _lhsIbetaUnique
_hdOclassEnvironment = rule3262 _lhsIclassEnvironment
_hdOcollectErrors = rule3263 _lhsIcollectErrors
_hdOcollectWarnings = rule3264 _lhsIcollectWarnings
_hdOcounter = rule3265 _lhsIcounter
_hdOcurrentChunk = rule3266 _lhsIcurrentChunk
_hdOdictionaryEnvironment = rule3267 _lhsIdictionaryEnvironment
_hdOimportEnvironment = rule3268 _lhsIimportEnvironment
_hdOmatchIO = rule3269 _lhsImatchIO
_hdOmonos = rule3270 _lhsImonos
_hdOnamesInScope = rule3271 _lhsInamesInScope
_hdOorderedTypeSynonyms = rule3272 _lhsIorderedTypeSynonyms
_hdOparentTree = rule3273 _lhsIparentTree
_hdOpatternMatchWarnings = rule3274 _lhsIpatternMatchWarnings
_hdOsubstitution = rule3275 _lhsIsubstitution
_hdOtypeschemeMap = rule3276 _lhsItypeschemeMap
_hdOuniqueChunk = rule3277 _lhsIuniqueChunk
_hdOuniqueSecondRound = rule3278 _lhsIuniqueSecondRound
_tlOallPatterns = rule3279 _lhsIallPatterns
_tlOallTypeSchemes = rule3280 _lhsIallTypeSchemes
_tlOavailablePredicates = rule3281 _lhsIavailablePredicates
_tlObetaUnique = rule3282 _hdIbetaUnique
_tlOclassEnvironment = rule3283 _lhsIclassEnvironment
_tlOcollectErrors = rule3284 _hdIcollectErrors
_tlOcollectWarnings = rule3285 _hdIcollectWarnings
_tlOcounter = rule3286 _hdIcounter
_tlOcurrentChunk = rule3287 _lhsIcurrentChunk
_tlOdictionaryEnvironment = rule3288 _hdIdictionaryEnvironment
_tlOimportEnvironment = rule3289 _lhsIimportEnvironment
_tlOmatchIO = rule3290 _hdImatchIO
_tlOmonos = rule3291 _hdImonos
_tlOnamesInScope = rule3292 _hdInamesInScope
_tlOorderedTypeSynonyms = rule3293 _lhsIorderedTypeSynonyms
_tlOparentTree = rule3294 _lhsIparentTree
_tlOpatternMatchWarnings = rule3295 _hdIpatternMatchWarnings
_tlOsubstitution = rule3296 _lhsIsubstitution
_tlOtypeschemeMap = rule3297 _lhsItypeschemeMap
_tlOuniqueChunk = rule3298 _hdIuniqueChunk
_tlOuniqueSecondRound = rule3299 _hdIuniqueSecondRound
__result_ = T_Qualifiers_vOut130 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Qualifiers_s131 v130
rule3234 = \ ((_hdIassumptions) :: Assumptions) ->
_hdIassumptions
rule3235 = \ ((_hdIconstraints) :: ConstraintSet) ->
_hdIconstraints
rule3236 = \ ((_tlIassumptions) :: Assumptions) ->
_tlIassumptions
rule3237 = \ ((_tlIconstraints) :: ConstraintSet) ->
_tlIconstraints
rule3238 = \ ((_lhsIassumptions) :: Assumptions) ->
_lhsIassumptions
rule3239 = \ ((_lhsIconstraints) :: ConstraintSet) ->
_lhsIconstraints
rule3240 = \ ((_hdIinfoTree) :: InfoTree) ((_tlIinfoTrees) :: InfoTrees) ->
_hdIinfoTree : _tlIinfoTrees
rule3241 = \ ((_hdIunboundNames) :: Names) ->
_hdIunboundNames
rule3242 = \ ((_lhsIunboundNames) :: Names) ->
_lhsIunboundNames
rule3243 = \ ((_tlIunboundNames) :: Names) ->
_tlIunboundNames
rule3244 = \ ((_hdIcollectInstances) :: [(Name, Instance)]) ((_tlIcollectInstances) :: [(Name, Instance)]) ->
_hdIcollectInstances ++ _tlIcollectInstances
rule3245 = \ ((_hdIself) :: Qualifier) ((_tlIself) :: Qualifiers) ->
(:) _hdIself _tlIself
rule3246 = \ _self ->
_self
rule3247 = \ ((_tlIbetaUnique) :: Int) ->
_tlIbetaUnique
rule3248 = \ ((_tlIcollectErrors) :: TypeErrors) ->
_tlIcollectErrors
rule3249 = \ ((_tlIcollectWarnings) :: Warnings) ->
_tlIcollectWarnings
rule3250 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule3251 = \ ((_tlIdictionaryEnvironment) :: DictionaryEnvironment) ->
_tlIdictionaryEnvironment
rule3252 = \ ((_tlImatchIO) :: IO ()) ->
_tlImatchIO
rule3253 = \ ((_tlImonos) :: Monos) ->
_tlImonos
rule3254 = \ ((_tlInamesInScope) :: Names) ->
_tlInamesInScope
rule3255 = \ ((_tlIpatternMatchWarnings) :: [Warning]) ->
_tlIpatternMatchWarnings
rule3256 = \ ((_tlIuniqueChunk) :: Int) ->
_tlIuniqueChunk
rule3257 = \ ((_tlIuniqueSecondRound) :: Int) ->
_tlIuniqueSecondRound
rule3258 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3259 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3260 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3261 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3262 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3263 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3264 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3265 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3266 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3267 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3268 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3269 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3270 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3271 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3272 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3273 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule3274 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3275 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3276 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3277 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3278 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule3279 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3280 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3281 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3282 = \ ((_hdIbetaUnique) :: Int) ->
_hdIbetaUnique
rule3283 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3284 = \ ((_hdIcollectErrors) :: TypeErrors) ->
_hdIcollectErrors
rule3285 = \ ((_hdIcollectWarnings) :: Warnings) ->
_hdIcollectWarnings
rule3286 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule3287 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3288 = \ ((_hdIdictionaryEnvironment) :: DictionaryEnvironment) ->
_hdIdictionaryEnvironment
rule3289 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3290 = \ ((_hdImatchIO) :: IO ()) ->
_hdImatchIO
rule3291 = \ ((_hdImonos) :: Monos) ->
_hdImonos
rule3292 = \ ((_hdInamesInScope) :: Names) ->
_hdInamesInScope
rule3293 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3294 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule3295 = \ ((_hdIpatternMatchWarnings) :: [Warning]) ->
_hdIpatternMatchWarnings
rule3296 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3297 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3298 = \ ((_hdIuniqueChunk) :: Int) ->
_hdIuniqueChunk
rule3299 = \ ((_hdIuniqueSecondRound) :: Int) ->
_hdIuniqueSecondRound
sem_Qualifiers_Nil :: T_Qualifiers
sem_Qualifiers_Nil = T_Qualifiers (return st131) where
st131 = let
v130 :: T_Qualifiers_v130
v130 = \ (T_Qualifiers_vIn130 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule3300 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3301 _lhsIunboundNames
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3302 ()
_self = rule3303 ()
_lhsOself :: Qualifiers
_lhsOself = rule3304 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3305 _lhsIassumptions
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3306 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3307 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3308 _lhsIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3309 _lhsIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule3310 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3311 _lhsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3312 _lhsImatchIO
_lhsOmonos :: Monos
_lhsOmonos = rule3313 _lhsImonos
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3314 _lhsInamesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3315 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3316 _lhsIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3317 _lhsIuniqueSecondRound
__result_ = T_Qualifiers_vOut130 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOinfoTrees _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Qualifiers_s131 v130
rule3300 = \ (_ :: ()) ->
[]
rule3301 = \ ((_lhsIunboundNames) :: Names) ->
_lhsIunboundNames
rule3302 = \ (_ :: ()) ->
[]
rule3303 = \ (_ :: ()) ->
[]
rule3304 = \ _self ->
_self
rule3305 = \ ((_lhsIassumptions) :: Assumptions) ->
_lhsIassumptions
rule3306 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3307 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3308 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3309 = \ ((_lhsIconstraints) :: ConstraintSet) ->
_lhsIconstraints
rule3310 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3311 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3312 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3313 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3314 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3315 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3316 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3317 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
data Inh_Range = Inh_Range { }
data Syn_Range = Syn_Range { self_Syn_Range :: (Range) }
wrap_Range :: T_Range -> Inh_Range -> (Syn_Range )
wrap_Range (T_Range act) (Inh_Range ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Range_vIn133
(T_Range_vOut133 _lhsOself) <- return (inv_Range_s134 sem arg)
return (Syn_Range _lhsOself)
)
sem_Range :: Range -> T_Range
sem_Range ( Range_Range start_ stop_ ) = sem_Range_Range ( sem_Position start_ ) ( sem_Position stop_ )
newtype T_Range = T_Range {
attach_T_Range :: Identity (T_Range_s134 )
}
newtype T_Range_s134 = C_Range_s134 {
inv_Range_s134 :: (T_Range_v133 )
}
data T_Range_s135 = C_Range_s135
type T_Range_v133 = (T_Range_vIn133 ) -> (T_Range_vOut133 )
data T_Range_vIn133 = T_Range_vIn133
data T_Range_vOut133 = T_Range_vOut133 (Range)
sem_Range_Range :: T_Position -> T_Position -> T_Range
sem_Range_Range arg_start_ arg_stop_ = T_Range (return st134) where
st134 = let
v133 :: T_Range_v133
v133 = \ (T_Range_vIn133 ) -> ( let
_startX125 = Control.Monad.Identity.runIdentity (attach_T_Position (arg_start_))
_stopX125 = Control.Monad.Identity.runIdentity (attach_T_Position (arg_stop_))
(T_Position_vOut124 _startIself) = inv_Position_s125 _startX125 (T_Position_vIn124 )
(T_Position_vOut124 _stopIself) = inv_Position_s125 _stopX125 (T_Position_vIn124 )
_self = rule3318 _startIself _stopIself
_lhsOself :: Range
_lhsOself = rule3319 _self
__result_ = T_Range_vOut133 _lhsOself
in __result_ )
in C_Range_s134 v133
rule3318 = \ ((_startIself) :: Position) ((_stopIself) :: Position) ->
Range_Range _startIself _stopIself
rule3319 = \ _self ->
_self
data Inh_RecordExpressionBinding = Inh_RecordExpressionBinding { allTypeSchemes_Inh_RecordExpressionBinding :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_RecordExpressionBinding :: (Predicates), classEnvironment_Inh_RecordExpressionBinding :: (ClassEnvironment), collectErrors_Inh_RecordExpressionBinding :: (TypeErrors), collectWarnings_Inh_RecordExpressionBinding :: (Warnings), counter_Inh_RecordExpressionBinding :: (Int), currentChunk_Inh_RecordExpressionBinding :: (Int), dictionaryEnvironment_Inh_RecordExpressionBinding :: (DictionaryEnvironment), importEnvironment_Inh_RecordExpressionBinding :: (ImportEnvironment), namesInScope_Inh_RecordExpressionBinding :: (Names), orderedTypeSynonyms_Inh_RecordExpressionBinding :: (OrderedTypeSynonyms), patternMatchWarnings_Inh_RecordExpressionBinding :: ([Warning]), substitution_Inh_RecordExpressionBinding :: (FixpointSubstitution), typeschemeMap_Inh_RecordExpressionBinding :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_RecordExpressionBinding :: (Int) }
data Syn_RecordExpressionBinding = Syn_RecordExpressionBinding { collectErrors_Syn_RecordExpressionBinding :: (TypeErrors), collectInstances_Syn_RecordExpressionBinding :: ([(Name, Instance)]), collectWarnings_Syn_RecordExpressionBinding :: (Warnings), counter_Syn_RecordExpressionBinding :: (Int), dictionaryEnvironment_Syn_RecordExpressionBinding :: (DictionaryEnvironment), patternMatchWarnings_Syn_RecordExpressionBinding :: ([Warning]), self_Syn_RecordExpressionBinding :: (RecordExpressionBinding), unboundNames_Syn_RecordExpressionBinding :: (Names), uniqueChunk_Syn_RecordExpressionBinding :: (Int) }
wrap_RecordExpressionBinding :: T_RecordExpressionBinding -> Inh_RecordExpressionBinding -> (Syn_RecordExpressionBinding )
wrap_RecordExpressionBinding (T_RecordExpressionBinding act) (Inh_RecordExpressionBinding _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_RecordExpressionBinding_vIn136 _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk
(T_RecordExpressionBinding_vOut136 _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdictionaryEnvironment _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk) <- return (inv_RecordExpressionBinding_s137 sem arg)
return (Syn_RecordExpressionBinding _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdictionaryEnvironment _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk)
)
sem_RecordExpressionBinding :: RecordExpressionBinding -> T_RecordExpressionBinding
sem_RecordExpressionBinding ( RecordExpressionBinding_RecordExpressionBinding range_ name_ expression_ ) = sem_RecordExpressionBinding_RecordExpressionBinding ( sem_Range range_ ) ( sem_Name name_ ) ( sem_Expression expression_ )
newtype T_RecordExpressionBinding = T_RecordExpressionBinding {
attach_T_RecordExpressionBinding :: Identity (T_RecordExpressionBinding_s137 )
}
newtype T_RecordExpressionBinding_s137 = C_RecordExpressionBinding_s137 {
inv_RecordExpressionBinding_s137 :: (T_RecordExpressionBinding_v136 )
}
data T_RecordExpressionBinding_s138 = C_RecordExpressionBinding_s138
type T_RecordExpressionBinding_v136 = (T_RecordExpressionBinding_vIn136 ) -> (T_RecordExpressionBinding_vOut136 )
data T_RecordExpressionBinding_vIn136 = T_RecordExpressionBinding_vIn136 (M.Map NameWithRange TpScheme) (Predicates) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (Names) (OrderedTypeSynonyms) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Int)
data T_RecordExpressionBinding_vOut136 = T_RecordExpressionBinding_vOut136 (TypeErrors) ([(Name, Instance)]) (Warnings) (Int) (DictionaryEnvironment) ([Warning]) (RecordExpressionBinding) (Names) (Int)
sem_RecordExpressionBinding_RecordExpressionBinding :: T_Range -> T_Name -> T_Expression -> T_RecordExpressionBinding
sem_RecordExpressionBinding_RecordExpressionBinding arg_range_ arg_name_ arg_expression_ = T_RecordExpressionBinding (return st137) where
st137 = let
v136 :: T_RecordExpressionBinding_v136
v136 = \ (T_RecordExpressionBinding_vIn136 _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_parentTree = rule3320 ()
(_monos,_constructorenv,_betaUnique,_miscerrors,_warnings,_kindErrors,_valueConstructors,_allValueConstructors,_typeConstructors,_allTypeConstructors,_importEnvironment) = rule3321 ()
(_allPatterns,_tryPatterns,_matchIO,_uniqueSecondRound) = rule3322 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3323 _expressionIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3324 _expressionIunboundNames
_self = rule3325 _expressionIself _nameIself _rangeIself
_lhsOself :: RecordExpressionBinding
_lhsOself = rule3326 _self
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3327 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3328 _expressionIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3329 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3330 _expressionIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3331 _expressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3332 _expressionIuniqueChunk
_expressionOallPatterns = rule3333 _allPatterns
_expressionOallTypeSchemes = rule3334 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule3335 _lhsIavailablePredicates
_expressionObetaUnique = rule3336 _betaUnique
_expressionOclassEnvironment = rule3337 _lhsIclassEnvironment
_expressionOcollectErrors = rule3338 _lhsIcollectErrors
_expressionOcollectWarnings = rule3339 _lhsIcollectWarnings
_expressionOcounter = rule3340 _lhsIcounter
_expressionOcurrentChunk = rule3341 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule3342 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule3343 _importEnvironment
_expressionOmatchIO = rule3344 _matchIO
_expressionOmonos = rule3345 _monos
_expressionOnamesInScope = rule3346 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule3347 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule3348 _parentTree
_expressionOpatternMatchWarnings = rule3349 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule3350 _lhsIsubstitution
_expressionOtryPatterns = rule3351 _tryPatterns
_expressionOtypeschemeMap = rule3352 _lhsItypeschemeMap
_expressionOuniqueChunk = rule3353 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule3354 _uniqueSecondRound
__result_ = T_RecordExpressionBinding_vOut136 _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdictionaryEnvironment _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_RecordExpressionBinding_s137 v136
rule3320 = \ (_ :: ()) ->
globalInfoError
rule3321 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "RecordExpressionBinding.RecordExpressionBinding"
rule3322 = \ (_ :: ()) ->
internalError "TS_PatternMatching.ag" "n/a" "RecordExpressionBinding is not supported"
rule3323 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule3324 = \ ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames
rule3325 = \ ((_expressionIself) :: Expression) ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
RecordExpressionBinding_RecordExpressionBinding _rangeIself _nameIself _expressionIself
rule3326 = \ _self ->
_self
rule3327 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule3328 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule3329 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule3330 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule3331 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule3332 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule3333 = \ _allPatterns ->
_allPatterns
rule3334 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3335 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3336 = \ _betaUnique ->
_betaUnique
rule3337 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3338 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3339 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3340 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3341 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3342 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3343 = \ _importEnvironment ->
_importEnvironment
rule3344 = \ _matchIO ->
_matchIO
rule3345 = \ _monos ->
_monos
rule3346 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3347 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3348 = \ _parentTree ->
_parentTree
rule3349 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3350 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3351 = \ _tryPatterns ->
_tryPatterns
rule3352 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3353 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3354 = \ _uniqueSecondRound ->
_uniqueSecondRound
data Inh_RecordExpressionBindings = Inh_RecordExpressionBindings { allTypeSchemes_Inh_RecordExpressionBindings :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_RecordExpressionBindings :: (Predicates), classEnvironment_Inh_RecordExpressionBindings :: (ClassEnvironment), collectErrors_Inh_RecordExpressionBindings :: (TypeErrors), collectWarnings_Inh_RecordExpressionBindings :: (Warnings), counter_Inh_RecordExpressionBindings :: (Int), currentChunk_Inh_RecordExpressionBindings :: (Int), dictionaryEnvironment_Inh_RecordExpressionBindings :: (DictionaryEnvironment), importEnvironment_Inh_RecordExpressionBindings :: (ImportEnvironment), namesInScope_Inh_RecordExpressionBindings :: (Names), orderedTypeSynonyms_Inh_RecordExpressionBindings :: (OrderedTypeSynonyms), patternMatchWarnings_Inh_RecordExpressionBindings :: ([Warning]), substitution_Inh_RecordExpressionBindings :: (FixpointSubstitution), typeschemeMap_Inh_RecordExpressionBindings :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_RecordExpressionBindings :: (Int) }
data Syn_RecordExpressionBindings = Syn_RecordExpressionBindings { collectErrors_Syn_RecordExpressionBindings :: (TypeErrors), collectInstances_Syn_RecordExpressionBindings :: ([(Name, Instance)]), collectWarnings_Syn_RecordExpressionBindings :: (Warnings), counter_Syn_RecordExpressionBindings :: (Int), dictionaryEnvironment_Syn_RecordExpressionBindings :: (DictionaryEnvironment), patternMatchWarnings_Syn_RecordExpressionBindings :: ([Warning]), self_Syn_RecordExpressionBindings :: (RecordExpressionBindings), unboundNames_Syn_RecordExpressionBindings :: (Names), uniqueChunk_Syn_RecordExpressionBindings :: (Int) }
wrap_RecordExpressionBindings :: T_RecordExpressionBindings -> Inh_RecordExpressionBindings -> (Syn_RecordExpressionBindings )
wrap_RecordExpressionBindings (T_RecordExpressionBindings act) (Inh_RecordExpressionBindings _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_RecordExpressionBindings_vIn139 _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk
(T_RecordExpressionBindings_vOut139 _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdictionaryEnvironment _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk) <- return (inv_RecordExpressionBindings_s140 sem arg)
return (Syn_RecordExpressionBindings _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdictionaryEnvironment _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk)
)
sem_RecordExpressionBindings :: RecordExpressionBindings -> T_RecordExpressionBindings
sem_RecordExpressionBindings list = Prelude.foldr sem_RecordExpressionBindings_Cons sem_RecordExpressionBindings_Nil (Prelude.map sem_RecordExpressionBinding list)
newtype T_RecordExpressionBindings = T_RecordExpressionBindings {
attach_T_RecordExpressionBindings :: Identity (T_RecordExpressionBindings_s140 )
}
newtype T_RecordExpressionBindings_s140 = C_RecordExpressionBindings_s140 {
inv_RecordExpressionBindings_s140 :: (T_RecordExpressionBindings_v139 )
}
data T_RecordExpressionBindings_s141 = C_RecordExpressionBindings_s141
type T_RecordExpressionBindings_v139 = (T_RecordExpressionBindings_vIn139 ) -> (T_RecordExpressionBindings_vOut139 )
data T_RecordExpressionBindings_vIn139 = T_RecordExpressionBindings_vIn139 (M.Map NameWithRange TpScheme) (Predicates) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (Names) (OrderedTypeSynonyms) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Int)
data T_RecordExpressionBindings_vOut139 = T_RecordExpressionBindings_vOut139 (TypeErrors) ([(Name, Instance)]) (Warnings) (Int) (DictionaryEnvironment) ([Warning]) (RecordExpressionBindings) (Names) (Int)
sem_RecordExpressionBindings_Cons :: T_RecordExpressionBinding -> T_RecordExpressionBindings -> T_RecordExpressionBindings
sem_RecordExpressionBindings_Cons arg_hd_ arg_tl_ = T_RecordExpressionBindings (return st140) where
st140 = let
v139 :: T_RecordExpressionBindings_v139
v139 = \ (T_RecordExpressionBindings_vIn139 _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_hdX137 = Control.Monad.Identity.runIdentity (attach_T_RecordExpressionBinding (arg_hd_))
_tlX140 = Control.Monad.Identity.runIdentity (attach_T_RecordExpressionBindings (arg_tl_))
(T_RecordExpressionBinding_vOut136 _hdIcollectErrors _hdIcollectInstances _hdIcollectWarnings _hdIcounter _hdIdictionaryEnvironment _hdIpatternMatchWarnings _hdIself _hdIunboundNames _hdIuniqueChunk) = inv_RecordExpressionBinding_s137 _hdX137 (T_RecordExpressionBinding_vIn136 _hdOallTypeSchemes _hdOavailablePredicates _hdOclassEnvironment _hdOcollectErrors _hdOcollectWarnings _hdOcounter _hdOcurrentChunk _hdOdictionaryEnvironment _hdOimportEnvironment _hdOnamesInScope _hdOorderedTypeSynonyms _hdOpatternMatchWarnings _hdOsubstitution _hdOtypeschemeMap _hdOuniqueChunk)
(T_RecordExpressionBindings_vOut139 _tlIcollectErrors _tlIcollectInstances _tlIcollectWarnings _tlIcounter _tlIdictionaryEnvironment _tlIpatternMatchWarnings _tlIself _tlIunboundNames _tlIuniqueChunk) = inv_RecordExpressionBindings_s140 _tlX140 (T_RecordExpressionBindings_vIn139 _tlOallTypeSchemes _tlOavailablePredicates _tlOclassEnvironment _tlOcollectErrors _tlOcollectWarnings _tlOcounter _tlOcurrentChunk _tlOdictionaryEnvironment _tlOimportEnvironment _tlOnamesInScope _tlOorderedTypeSynonyms _tlOpatternMatchWarnings _tlOsubstitution _tlOtypeschemeMap _tlOuniqueChunk)
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3355 _hdIcollectInstances _tlIcollectInstances
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3356 _hdIunboundNames _tlIunboundNames
_self = rule3357 _hdIself _tlIself
_lhsOself :: RecordExpressionBindings
_lhsOself = rule3358 _self
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3359 _tlIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3360 _tlIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3361 _tlIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3362 _tlIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3363 _tlIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3364 _tlIuniqueChunk
_hdOallTypeSchemes = rule3365 _lhsIallTypeSchemes
_hdOavailablePredicates = rule3366 _lhsIavailablePredicates
_hdOclassEnvironment = rule3367 _lhsIclassEnvironment
_hdOcollectErrors = rule3368 _lhsIcollectErrors
_hdOcollectWarnings = rule3369 _lhsIcollectWarnings
_hdOcounter = rule3370 _lhsIcounter
_hdOcurrentChunk = rule3371 _lhsIcurrentChunk
_hdOdictionaryEnvironment = rule3372 _lhsIdictionaryEnvironment
_hdOimportEnvironment = rule3373 _lhsIimportEnvironment
_hdOnamesInScope = rule3374 _lhsInamesInScope
_hdOorderedTypeSynonyms = rule3375 _lhsIorderedTypeSynonyms
_hdOpatternMatchWarnings = rule3376 _lhsIpatternMatchWarnings
_hdOsubstitution = rule3377 _lhsIsubstitution
_hdOtypeschemeMap = rule3378 _lhsItypeschemeMap
_hdOuniqueChunk = rule3379 _lhsIuniqueChunk
_tlOallTypeSchemes = rule3380 _lhsIallTypeSchemes
_tlOavailablePredicates = rule3381 _lhsIavailablePredicates
_tlOclassEnvironment = rule3382 _lhsIclassEnvironment
_tlOcollectErrors = rule3383 _hdIcollectErrors
_tlOcollectWarnings = rule3384 _hdIcollectWarnings
_tlOcounter = rule3385 _hdIcounter
_tlOcurrentChunk = rule3386 _lhsIcurrentChunk
_tlOdictionaryEnvironment = rule3387 _hdIdictionaryEnvironment
_tlOimportEnvironment = rule3388 _lhsIimportEnvironment
_tlOnamesInScope = rule3389 _lhsInamesInScope
_tlOorderedTypeSynonyms = rule3390 _lhsIorderedTypeSynonyms
_tlOpatternMatchWarnings = rule3391 _hdIpatternMatchWarnings
_tlOsubstitution = rule3392 _lhsIsubstitution
_tlOtypeschemeMap = rule3393 _lhsItypeschemeMap
_tlOuniqueChunk = rule3394 _hdIuniqueChunk
__result_ = T_RecordExpressionBindings_vOut139 _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdictionaryEnvironment _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_RecordExpressionBindings_s140 v139
rule3355 = \ ((_hdIcollectInstances) :: [(Name, Instance)]) ((_tlIcollectInstances) :: [(Name, Instance)]) ->
_hdIcollectInstances ++ _tlIcollectInstances
rule3356 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule3357 = \ ((_hdIself) :: RecordExpressionBinding) ((_tlIself) :: RecordExpressionBindings) ->
(:) _hdIself _tlIself
rule3358 = \ _self ->
_self
rule3359 = \ ((_tlIcollectErrors) :: TypeErrors) ->
_tlIcollectErrors
rule3360 = \ ((_tlIcollectWarnings) :: Warnings) ->
_tlIcollectWarnings
rule3361 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule3362 = \ ((_tlIdictionaryEnvironment) :: DictionaryEnvironment) ->
_tlIdictionaryEnvironment
rule3363 = \ ((_tlIpatternMatchWarnings) :: [Warning]) ->
_tlIpatternMatchWarnings
rule3364 = \ ((_tlIuniqueChunk) :: Int) ->
_tlIuniqueChunk
rule3365 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3366 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3367 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3368 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3369 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3370 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3371 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3372 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3373 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3374 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3375 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3376 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3377 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3378 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3379 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3380 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3381 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3382 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3383 = \ ((_hdIcollectErrors) :: TypeErrors) ->
_hdIcollectErrors
rule3384 = \ ((_hdIcollectWarnings) :: Warnings) ->
_hdIcollectWarnings
rule3385 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule3386 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3387 = \ ((_hdIdictionaryEnvironment) :: DictionaryEnvironment) ->
_hdIdictionaryEnvironment
rule3388 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3389 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3390 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3391 = \ ((_hdIpatternMatchWarnings) :: [Warning]) ->
_hdIpatternMatchWarnings
rule3392 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3393 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3394 = \ ((_hdIuniqueChunk) :: Int) ->
_hdIuniqueChunk
sem_RecordExpressionBindings_Nil :: T_RecordExpressionBindings
sem_RecordExpressionBindings_Nil = T_RecordExpressionBindings (return st140) where
st140 = let
v139 :: T_RecordExpressionBindings_v139
v139 = \ (T_RecordExpressionBindings_vIn139 _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3395 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3396 ()
_self = rule3397 ()
_lhsOself :: RecordExpressionBindings
_lhsOself = rule3398 _self
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3399 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3400 _lhsIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3401 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3402 _lhsIdictionaryEnvironment
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3403 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3404 _lhsIuniqueChunk
__result_ = T_RecordExpressionBindings_vOut139 _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOcounter _lhsOdictionaryEnvironment _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_RecordExpressionBindings_s140 v139
rule3395 = \ (_ :: ()) ->
[]
rule3396 = \ (_ :: ()) ->
[]
rule3397 = \ (_ :: ()) ->
[]
rule3398 = \ _self ->
_self
rule3399 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3400 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3401 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3402 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3403 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3404 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
data Inh_RecordPatternBinding = Inh_RecordPatternBinding { counter_Inh_RecordPatternBinding :: (Int), namesInScope_Inh_RecordPatternBinding :: (Names), patternMatchWarnings_Inh_RecordPatternBinding :: ([Warning]) }
data Syn_RecordPatternBinding = Syn_RecordPatternBinding { counter_Syn_RecordPatternBinding :: (Int), patternMatchWarnings_Syn_RecordPatternBinding :: ([Warning]), self_Syn_RecordPatternBinding :: (RecordPatternBinding), unboundNames_Syn_RecordPatternBinding :: (Names) }
wrap_RecordPatternBinding :: T_RecordPatternBinding -> Inh_RecordPatternBinding -> (Syn_RecordPatternBinding )
wrap_RecordPatternBinding (T_RecordPatternBinding act) (Inh_RecordPatternBinding _lhsIcounter _lhsInamesInScope _lhsIpatternMatchWarnings) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_RecordPatternBinding_vIn142 _lhsIcounter _lhsInamesInScope _lhsIpatternMatchWarnings
(T_RecordPatternBinding_vOut142 _lhsOcounter _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames) <- return (inv_RecordPatternBinding_s143 sem arg)
return (Syn_RecordPatternBinding _lhsOcounter _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames)
)
sem_RecordPatternBinding :: RecordPatternBinding -> T_RecordPatternBinding
sem_RecordPatternBinding ( RecordPatternBinding_RecordPatternBinding range_ name_ pattern_ ) = sem_RecordPatternBinding_RecordPatternBinding ( sem_Range range_ ) ( sem_Name name_ ) ( sem_Pattern pattern_ )
newtype T_RecordPatternBinding = T_RecordPatternBinding {
attach_T_RecordPatternBinding :: Identity (T_RecordPatternBinding_s143 )
}
newtype T_RecordPatternBinding_s143 = C_RecordPatternBinding_s143 {
inv_RecordPatternBinding_s143 :: (T_RecordPatternBinding_v142 )
}
data T_RecordPatternBinding_s144 = C_RecordPatternBinding_s144
type T_RecordPatternBinding_v142 = (T_RecordPatternBinding_vIn142 ) -> (T_RecordPatternBinding_vOut142 )
data T_RecordPatternBinding_vIn142 = T_RecordPatternBinding_vIn142 (Int) (Names) ([Warning])
data T_RecordPatternBinding_vOut142 = T_RecordPatternBinding_vOut142 (Int) ([Warning]) (RecordPatternBinding) (Names)
sem_RecordPatternBinding_RecordPatternBinding :: T_Range -> T_Name -> T_Pattern -> T_RecordPatternBinding
sem_RecordPatternBinding_RecordPatternBinding arg_range_ arg_name_ arg_pattern_ = T_RecordPatternBinding (return st143) where
st143 = let
v142 :: T_RecordPatternBinding_v142
v142 = \ (T_RecordPatternBinding_vIn142 _lhsIcounter _lhsInamesInScope _lhsIpatternMatchWarnings) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_patternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_Pattern_vOut118 _patternIbeta _patternIbetaUnique _patternIconstraints _patternIcounter _patternIelements _patternIenvironment _patternIinfoTree _patternIpatVarNames _patternIpatternMatchWarnings _patternIself _patternIunboundNames) = inv_Pattern_s119 _patternX119 (T_Pattern_vIn118 _patternObetaUnique _patternOcounter _patternOimportEnvironment _patternOmonos _patternOnamesInScope _patternOparentTree _patternOpatternMatchWarnings)
_parentTree = rule3405 ()
(_monos,_constructorenv,_betaUnique,_miscerrors,_warnings,_valueConstructors,_allValueConstructors,_typeConstructors,_allTypeConstructors,_importEnvironment) = rule3406 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3407 _patternIunboundNames
_self = rule3408 _nameIself _patternIself _rangeIself
_lhsOself :: RecordPatternBinding
_lhsOself = rule3409 _self
_lhsOcounter :: Int
_lhsOcounter = rule3410 _patternIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3411 _patternIpatternMatchWarnings
_patternObetaUnique = rule3412 _betaUnique
_patternOcounter = rule3413 _lhsIcounter
_patternOimportEnvironment = rule3414 _importEnvironment
_patternOmonos = rule3415 _monos
_patternOnamesInScope = rule3416 _lhsInamesInScope
_patternOparentTree = rule3417 _parentTree
_patternOpatternMatchWarnings = rule3418 _lhsIpatternMatchWarnings
__result_ = T_RecordPatternBinding_vOut142 _lhsOcounter _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_RecordPatternBinding_s143 v142
rule3405 = \ (_ :: ()) ->
globalInfoError
rule3406 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "RecordPatternBinding.RecordPatternBinding"
rule3407 = \ ((_patternIunboundNames) :: Names) ->
_patternIunboundNames
rule3408 = \ ((_nameIself) :: Name) ((_patternIself) :: Pattern) ((_rangeIself) :: Range) ->
RecordPatternBinding_RecordPatternBinding _rangeIself _nameIself _patternIself
rule3409 = \ _self ->
_self
rule3410 = \ ((_patternIcounter) :: Int) ->
_patternIcounter
rule3411 = \ ((_patternIpatternMatchWarnings) :: [Warning]) ->
_patternIpatternMatchWarnings
rule3412 = \ _betaUnique ->
_betaUnique
rule3413 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3414 = \ _importEnvironment ->
_importEnvironment
rule3415 = \ _monos ->
_monos
rule3416 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3417 = \ _parentTree ->
_parentTree
rule3418 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
data Inh_RecordPatternBindings = Inh_RecordPatternBindings { counter_Inh_RecordPatternBindings :: (Int), namesInScope_Inh_RecordPatternBindings :: (Names), patternMatchWarnings_Inh_RecordPatternBindings :: ([Warning]) }
data Syn_RecordPatternBindings = Syn_RecordPatternBindings { counter_Syn_RecordPatternBindings :: (Int), patternMatchWarnings_Syn_RecordPatternBindings :: ([Warning]), self_Syn_RecordPatternBindings :: (RecordPatternBindings), unboundNames_Syn_RecordPatternBindings :: (Names) }
wrap_RecordPatternBindings :: T_RecordPatternBindings -> Inh_RecordPatternBindings -> (Syn_RecordPatternBindings )
wrap_RecordPatternBindings (T_RecordPatternBindings act) (Inh_RecordPatternBindings _lhsIcounter _lhsInamesInScope _lhsIpatternMatchWarnings) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_RecordPatternBindings_vIn145 _lhsIcounter _lhsInamesInScope _lhsIpatternMatchWarnings
(T_RecordPatternBindings_vOut145 _lhsOcounter _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames) <- return (inv_RecordPatternBindings_s146 sem arg)
return (Syn_RecordPatternBindings _lhsOcounter _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames)
)
sem_RecordPatternBindings :: RecordPatternBindings -> T_RecordPatternBindings
sem_RecordPatternBindings list = Prelude.foldr sem_RecordPatternBindings_Cons sem_RecordPatternBindings_Nil (Prelude.map sem_RecordPatternBinding list)
newtype T_RecordPatternBindings = T_RecordPatternBindings {
attach_T_RecordPatternBindings :: Identity (T_RecordPatternBindings_s146 )
}
newtype T_RecordPatternBindings_s146 = C_RecordPatternBindings_s146 {
inv_RecordPatternBindings_s146 :: (T_RecordPatternBindings_v145 )
}
data T_RecordPatternBindings_s147 = C_RecordPatternBindings_s147
type T_RecordPatternBindings_v145 = (T_RecordPatternBindings_vIn145 ) -> (T_RecordPatternBindings_vOut145 )
data T_RecordPatternBindings_vIn145 = T_RecordPatternBindings_vIn145 (Int) (Names) ([Warning])
data T_RecordPatternBindings_vOut145 = T_RecordPatternBindings_vOut145 (Int) ([Warning]) (RecordPatternBindings) (Names)
sem_RecordPatternBindings_Cons :: T_RecordPatternBinding -> T_RecordPatternBindings -> T_RecordPatternBindings
sem_RecordPatternBindings_Cons arg_hd_ arg_tl_ = T_RecordPatternBindings (return st146) where
st146 = let
v145 :: T_RecordPatternBindings_v145
v145 = \ (T_RecordPatternBindings_vIn145 _lhsIcounter _lhsInamesInScope _lhsIpatternMatchWarnings) -> ( let
_hdX143 = Control.Monad.Identity.runIdentity (attach_T_RecordPatternBinding (arg_hd_))
_tlX146 = Control.Monad.Identity.runIdentity (attach_T_RecordPatternBindings (arg_tl_))
(T_RecordPatternBinding_vOut142 _hdIcounter _hdIpatternMatchWarnings _hdIself _hdIunboundNames) = inv_RecordPatternBinding_s143 _hdX143 (T_RecordPatternBinding_vIn142 _hdOcounter _hdOnamesInScope _hdOpatternMatchWarnings)
(T_RecordPatternBindings_vOut145 _tlIcounter _tlIpatternMatchWarnings _tlIself _tlIunboundNames) = inv_RecordPatternBindings_s146 _tlX146 (T_RecordPatternBindings_vIn145 _tlOcounter _tlOnamesInScope _tlOpatternMatchWarnings)
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3419 _hdIunboundNames _tlIunboundNames
_self = rule3420 _hdIself _tlIself
_lhsOself :: RecordPatternBindings
_lhsOself = rule3421 _self
_lhsOcounter :: Int
_lhsOcounter = rule3422 _tlIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3423 _tlIpatternMatchWarnings
_hdOcounter = rule3424 _lhsIcounter
_hdOnamesInScope = rule3425 _lhsInamesInScope
_hdOpatternMatchWarnings = rule3426 _lhsIpatternMatchWarnings
_tlOcounter = rule3427 _hdIcounter
_tlOnamesInScope = rule3428 _lhsInamesInScope
_tlOpatternMatchWarnings = rule3429 _hdIpatternMatchWarnings
__result_ = T_RecordPatternBindings_vOut145 _lhsOcounter _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_RecordPatternBindings_s146 v145
rule3419 = \ ((_hdIunboundNames) :: Names) ((_tlIunboundNames) :: Names) ->
_hdIunboundNames ++ _tlIunboundNames
rule3420 = \ ((_hdIself) :: RecordPatternBinding) ((_tlIself) :: RecordPatternBindings) ->
(:) _hdIself _tlIself
rule3421 = \ _self ->
_self
rule3422 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule3423 = \ ((_tlIpatternMatchWarnings) :: [Warning]) ->
_tlIpatternMatchWarnings
rule3424 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3425 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3426 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3427 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule3428 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3429 = \ ((_hdIpatternMatchWarnings) :: [Warning]) ->
_hdIpatternMatchWarnings
sem_RecordPatternBindings_Nil :: T_RecordPatternBindings
sem_RecordPatternBindings_Nil = T_RecordPatternBindings (return st146) where
st146 = let
v145 :: T_RecordPatternBindings_v145
v145 = \ (T_RecordPatternBindings_vIn145 _lhsIcounter _lhsInamesInScope _lhsIpatternMatchWarnings) -> ( let
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3430 ()
_self = rule3431 ()
_lhsOself :: RecordPatternBindings
_lhsOself = rule3432 _self
_lhsOcounter :: Int
_lhsOcounter = rule3433 _lhsIcounter
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3434 _lhsIpatternMatchWarnings
__result_ = T_RecordPatternBindings_vOut145 _lhsOcounter _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames
in __result_ )
in C_RecordPatternBindings_s146 v145
rule3430 = \ (_ :: ()) ->
[]
rule3431 = \ (_ :: ()) ->
[]
rule3432 = \ _self ->
_self
rule3433 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3434 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
data Inh_RightHandSide = Inh_RightHandSide { allPatterns_Inh_RightHandSide :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_RightHandSide :: (M.Map NameWithRange TpScheme), availablePredicates_Inh_RightHandSide :: (Predicates), betaRight_Inh_RightHandSide :: (Tp), betaUnique_Inh_RightHandSide :: (Int), classEnvironment_Inh_RightHandSide :: (ClassEnvironment), collectErrors_Inh_RightHandSide :: (TypeErrors), collectWarnings_Inh_RightHandSide :: (Warnings), counter_Inh_RightHandSide :: (Int), currentChunk_Inh_RightHandSide :: (Int), dictionaryEnvironment_Inh_RightHandSide :: (DictionaryEnvironment), importEnvironment_Inh_RightHandSide :: (ImportEnvironment), matchIO_Inh_RightHandSide :: (IO ()), monos_Inh_RightHandSide :: (Monos), namesInScope_Inh_RightHandSide :: (Names), orderedTypeSynonyms_Inh_RightHandSide :: (OrderedTypeSynonyms), parentTree_Inh_RightHandSide :: (InfoTree), patternMatchWarnings_Inh_RightHandSide :: ([Warning]), substitution_Inh_RightHandSide :: (FixpointSubstitution), typeschemeMap_Inh_RightHandSide :: (M.Map Int (Scheme Predicates)), uniqueChunk_Inh_RightHandSide :: (Int) }
data Syn_RightHandSide = Syn_RightHandSide { assumptions_Syn_RightHandSide :: (Assumptions), betaUnique_Syn_RightHandSide :: (Int), collectErrors_Syn_RightHandSide :: (TypeErrors), collectInstances_Syn_RightHandSide :: ([(Name, Instance)]), collectWarnings_Syn_RightHandSide :: (Warnings), constraints_Syn_RightHandSide :: (ConstraintSet), counter_Syn_RightHandSide :: (Int), dictionaryEnvironment_Syn_RightHandSide :: (DictionaryEnvironment), fallthrough_Syn_RightHandSide :: (Bool), infoTree_Syn_RightHandSide :: (InfoTree), matchIO_Syn_RightHandSide :: (IO ()), patternMatchWarnings_Syn_RightHandSide :: ([Warning]), self_Syn_RightHandSide :: (RightHandSide), unboundNames_Syn_RightHandSide :: (Names), uniqueChunk_Syn_RightHandSide :: (Int) }
wrap_RightHandSide :: T_RightHandSide -> Inh_RightHandSide -> (Syn_RightHandSide )
wrap_RightHandSide (T_RightHandSide act) (Inh_RightHandSide _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_RightHandSide_vIn148 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk
(T_RightHandSide_vOut148 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTree _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk) <- return (inv_RightHandSide_s149 sem arg)
return (Syn_RightHandSide _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTree _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk)
)
sem_RightHandSide :: RightHandSide -> T_RightHandSide
sem_RightHandSide ( RightHandSide_Expression range_ expression_ where_ ) = sem_RightHandSide_Expression ( sem_Range range_ ) ( sem_Expression expression_ ) ( sem_MaybeDeclarations where_ )
sem_RightHandSide ( RightHandSide_Guarded range_ guardedexpressions_ where_ ) = sem_RightHandSide_Guarded ( sem_Range range_ ) ( sem_GuardedExpressions guardedexpressions_ ) ( sem_MaybeDeclarations where_ )
newtype T_RightHandSide = T_RightHandSide {
attach_T_RightHandSide :: Identity (T_RightHandSide_s149 )
}
newtype T_RightHandSide_s149 = C_RightHandSide_s149 {
inv_RightHandSide_s149 :: (T_RightHandSide_v148 )
}
data T_RightHandSide_s150 = C_RightHandSide_s150
type T_RightHandSide_v148 = (T_RightHandSide_vIn148 ) -> (T_RightHandSide_vOut148 )
data T_RightHandSide_vIn148 = T_RightHandSide_vIn148 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Predicates) (Tp) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (Int) (Int) (DictionaryEnvironment) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Int)
data T_RightHandSide_vOut148 = T_RightHandSide_vOut148 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) (Bool) (InfoTree) (IO ()) ([Warning]) (RightHandSide) (Names) (Int)
sem_RightHandSide_Expression :: T_Range -> T_Expression -> T_MaybeDeclarations -> T_RightHandSide
sem_RightHandSide_Expression arg_range_ arg_expression_ arg_where_ = T_RightHandSide (return st149) where
st149 = let
v148 :: T_RightHandSide_v148
v148 = \ (T_RightHandSide_vIn148 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
_whereX89 = Control.Monad.Identity.runIdentity (attach_T_MaybeDeclarations (arg_where_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
(T_MaybeDeclarations_vOut88 _whereIassumptions _whereIbetaUnique _whereIcollectErrors _whereIcollectInstances _whereIcollectWarnings _whereIconstraints _whereIcounter _whereIdictionaryEnvironment _whereIinfoTrees _whereIlocalTypes _whereImatchIO _whereInamesInScope _whereIpatternMatchWarnings _whereIself _whereIunboundNames _whereIuniqueChunk) = inv_MaybeDeclarations_s89 _whereX89 (T_MaybeDeclarations_vIn88 _whereOallPatterns _whereOallTypeSchemes _whereOassumptions _whereOavailablePredicates _whereObetaUnique _whereOclassEnvironment _whereOcollectErrors _whereOcollectWarnings _whereOconstraints _whereOcounter _whereOcurrentChunk _whereOdictionaryEnvironment _whereOimportEnvironment _whereOmatchIO _whereOmonos _whereOnamesInScope _whereOorderedTypeSynonyms _whereOparentTree _whereOpatternMatchWarnings _whereOsubstitution _whereOtypeschemeMap _whereOunboundNames _whereOuniqueChunk)
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3435 _whereIassumptions
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3436 _whereIconstraints
_whereOassumptions = rule3437 _expressionIassumptions
_whereOconstraints = rule3438 _expressionIconstraints _newcon
_newcon = rule3439 _cinfo _expressionIbeta _lhsIbetaRight
_allTypeSchemes = rule3440 _lhsIallTypeSchemes _whereIlocalTypes
_cinfo = rule3441 _lhsIbetaRight _lhsIparentTree _parentTree
_localInfo = rule3442 _lhsImonos _self
_parentTree = rule3443 _expressionIinfoTree _lhsIparentTree _localInfo _whereIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3444 _parentTree
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3445 _whereIunboundNames
_expressionOnamesInScope = rule3446 _whereInamesInScope
_whereOunboundNames = rule3447 _expressionIunboundNames
_expressionOuniqueSecondRound = rule3448 _expressionIbetaUnique
_whereObetaUnique = rule3449 _expressionIuniqueSecondRound
_expressionOtryPatterns = rule3450 ()
_lhsOfallthrough :: Bool
_lhsOfallthrough = rule3451 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3452 _expressionIcollectInstances _whereIcollectInstances
_self = rule3453 _expressionIself _rangeIself _whereIself
_lhsOself :: RightHandSide
_lhsOself = rule3454 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3455 _whereIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3456 _whereIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3457 _whereIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3458 _whereIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3459 _whereIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3460 _whereImatchIO
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3461 _whereIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3462 _whereIuniqueChunk
_expressionOallPatterns = rule3463 _lhsIallPatterns
_expressionOallTypeSchemes = rule3464 _allTypeSchemes
_expressionOavailablePredicates = rule3465 _lhsIavailablePredicates
_expressionObetaUnique = rule3466 _lhsIbetaUnique
_expressionOclassEnvironment = rule3467 _lhsIclassEnvironment
_expressionOcollectErrors = rule3468 _lhsIcollectErrors
_expressionOcollectWarnings = rule3469 _lhsIcollectWarnings
_expressionOcounter = rule3470 _lhsIcounter
_expressionOcurrentChunk = rule3471 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule3472 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule3473 _lhsIimportEnvironment
_expressionOmatchIO = rule3474 _lhsImatchIO
_expressionOmonos = rule3475 _lhsImonos
_expressionOorderedTypeSynonyms = rule3476 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule3477 _parentTree
_expressionOpatternMatchWarnings = rule3478 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule3479 _lhsIsubstitution
_expressionOtypeschemeMap = rule3480 _lhsItypeschemeMap
_expressionOuniqueChunk = rule3481 _lhsIuniqueChunk
_whereOallPatterns = rule3482 _lhsIallPatterns
_whereOallTypeSchemes = rule3483 _allTypeSchemes
_whereOavailablePredicates = rule3484 _lhsIavailablePredicates
_whereOclassEnvironment = rule3485 _lhsIclassEnvironment
_whereOcollectErrors = rule3486 _expressionIcollectErrors
_whereOcollectWarnings = rule3487 _expressionIcollectWarnings
_whereOcounter = rule3488 _expressionIcounter
_whereOcurrentChunk = rule3489 _lhsIcurrentChunk
_whereOdictionaryEnvironment = rule3490 _expressionIdictionaryEnvironment
_whereOimportEnvironment = rule3491 _lhsIimportEnvironment
_whereOmatchIO = rule3492 _expressionImatchIO
_whereOmonos = rule3493 _lhsImonos
_whereOnamesInScope = rule3494 _lhsInamesInScope
_whereOorderedTypeSynonyms = rule3495 _lhsIorderedTypeSynonyms
_whereOparentTree = rule3496 _parentTree
_whereOpatternMatchWarnings = rule3497 _expressionIpatternMatchWarnings
_whereOsubstitution = rule3498 _lhsIsubstitution
_whereOtypeschemeMap = rule3499 _lhsItypeschemeMap
_whereOuniqueChunk = rule3500 _expressionIuniqueChunk
__result_ = T_RightHandSide_vOut148 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTree _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_RightHandSide_s149 v148
rule3435 = \ ((_whereIassumptions) :: Assumptions) ->
_whereIassumptions
rule3436 = \ ((_whereIconstraints) :: ConstraintSet) ->
_whereIconstraints
rule3437 = \ ((_expressionIassumptions) :: Assumptions) ->
_expressionIassumptions
rule3438 = \ ((_expressionIconstraints) :: ConstraintSet) _newcon ->
_newcon .>. _expressionIconstraints
rule3439 = \ _cinfo ((_expressionIbeta) :: Tp) ((_lhsIbetaRight) :: Tp) ->
[ (_expressionIbeta .==. _lhsIbetaRight) _cinfo ]
rule3440 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ((_whereIlocalTypes) :: M.Map NameWithRange TpScheme) ->
_whereIlocalTypes `M.union` _lhsIallTypeSchemes
rule3441 = \ ((_lhsIbetaRight) :: Tp) ((_lhsIparentTree) :: InfoTree) _parentTree ->
orphanConstraint 0 "right-hand side" _parentTree
[ Unifier (head (ftv _lhsIbetaRight)) ("right-hand sides", attribute (skip_UHA_FB_RHS _lhsIparentTree), "right-hand side") ]
rule3442 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_RHS _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule3443 = \ ((_expressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ((_whereIinfoTrees) :: InfoTrees) ->
node _lhsIparentTree _localInfo (_expressionIinfoTree : _whereIinfoTrees)
rule3444 = \ _parentTree ->
_parentTree
rule3445 = \ ((_whereIunboundNames) :: Names) ->
_whereIunboundNames
rule3446 = \ ((_whereInamesInScope) :: Names) ->
_whereInamesInScope
rule3447 = \ ((_expressionIunboundNames) :: Names) ->
_expressionIunboundNames
rule3448 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule3449 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule3450 = \ (_ :: ()) ->
[]
rule3451 = \ (_ :: ()) ->
False
rule3452 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ((_whereIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances ++ _whereIcollectInstances
rule3453 = \ ((_expressionIself) :: Expression) ((_rangeIself) :: Range) ((_whereIself) :: MaybeDeclarations) ->
RightHandSide_Expression _rangeIself _expressionIself _whereIself
rule3454 = \ _self ->
_self
rule3455 = \ ((_whereIbetaUnique) :: Int) ->
_whereIbetaUnique
rule3456 = \ ((_whereIcollectErrors) :: TypeErrors) ->
_whereIcollectErrors
rule3457 = \ ((_whereIcollectWarnings) :: Warnings) ->
_whereIcollectWarnings
rule3458 = \ ((_whereIcounter) :: Int) ->
_whereIcounter
rule3459 = \ ((_whereIdictionaryEnvironment) :: DictionaryEnvironment) ->
_whereIdictionaryEnvironment
rule3460 = \ ((_whereImatchIO) :: IO ()) ->
_whereImatchIO
rule3461 = \ ((_whereIpatternMatchWarnings) :: [Warning]) ->
_whereIpatternMatchWarnings
rule3462 = \ ((_whereIuniqueChunk) :: Int) ->
_whereIuniqueChunk
rule3463 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3464 = \ _allTypeSchemes ->
_allTypeSchemes
rule3465 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3466 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3467 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3468 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3469 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3470 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3471 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3472 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3473 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3474 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3475 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3476 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3477 = \ _parentTree ->
_parentTree
rule3478 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3479 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3480 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3481 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3482 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3483 = \ _allTypeSchemes ->
_allTypeSchemes
rule3484 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3485 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3486 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule3487 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule3488 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule3489 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3490 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule3491 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3492 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule3493 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3494 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3495 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3496 = \ _parentTree ->
_parentTree
rule3497 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule3498 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3499 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3500 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
sem_RightHandSide_Guarded :: T_Range -> T_GuardedExpressions -> T_MaybeDeclarations -> T_RightHandSide
sem_RightHandSide_Guarded arg_range_ arg_guardedexpressions_ arg_where_ = T_RightHandSide (return st149) where
st149 = let
v148 :: T_RightHandSide_v148
v148 = \ (T_RightHandSide_vIn148 _lhsIallPatterns _lhsIallTypeSchemes _lhsIavailablePredicates _lhsIbetaRight _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIuniqueChunk) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_guardedexpressionsX65 = Control.Monad.Identity.runIdentity (attach_T_GuardedExpressions (arg_guardedexpressions_))
_whereX89 = Control.Monad.Identity.runIdentity (attach_T_MaybeDeclarations (arg_where_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_GuardedExpressions_vOut64 _guardedexpressionsIassumptions _guardedexpressionsIbetaUnique _guardedexpressionsIcollectErrors _guardedexpressionsIcollectInstances _guardedexpressionsIcollectWarnings _guardedexpressionsIconstraintslist _guardedexpressionsIcounter _guardedexpressionsIdictionaryEnvironment _guardedexpressionsIfallthrough _guardedexpressionsIinfoTrees _guardedexpressionsImatchIO _guardedexpressionsIpatternMatchWarnings _guardedexpressionsIself _guardedexpressionsIunboundNames _guardedexpressionsIuniqueChunk _guardedexpressionsIuniqueSecondRound) = inv_GuardedExpressions_s65 _guardedexpressionsX65 (T_GuardedExpressions_vIn64 _guardedexpressionsOallPatterns _guardedexpressionsOallTypeSchemes _guardedexpressionsOavailablePredicates _guardedexpressionsObetaRight _guardedexpressionsObetaUnique _guardedexpressionsOclassEnvironment _guardedexpressionsOcollectErrors _guardedexpressionsOcollectWarnings _guardedexpressionsOcounter _guardedexpressionsOcurrentChunk _guardedexpressionsOdictionaryEnvironment _guardedexpressionsOimportEnvironment _guardedexpressionsOmatchIO _guardedexpressionsOmonos _guardedexpressionsOnamesInScope _guardedexpressionsOnumberOfGuards _guardedexpressionsOopen _guardedexpressionsOorderedTypeSynonyms _guardedexpressionsOparentTree _guardedexpressionsOpatternMatchWarnings _guardedexpressionsOsubstitution _guardedexpressionsOtypeschemeMap _guardedexpressionsOuniqueChunk _guardedexpressionsOuniqueSecondRound)
(T_MaybeDeclarations_vOut88 _whereIassumptions _whereIbetaUnique _whereIcollectErrors _whereIcollectInstances _whereIcollectWarnings _whereIconstraints _whereIcounter _whereIdictionaryEnvironment _whereIinfoTrees _whereIlocalTypes _whereImatchIO _whereInamesInScope _whereIpatternMatchWarnings _whereIself _whereIunboundNames _whereIuniqueChunk) = inv_MaybeDeclarations_s89 _whereX89 (T_MaybeDeclarations_vIn88 _whereOallPatterns _whereOallTypeSchemes _whereOassumptions _whereOavailablePredicates _whereObetaUnique _whereOclassEnvironment _whereOcollectErrors _whereOcollectWarnings _whereOconstraints _whereOcounter _whereOcurrentChunk _whereOdictionaryEnvironment _whereOimportEnvironment _whereOmatchIO _whereOmonos _whereOnamesInScope _whereOorderedTypeSynonyms _whereOparentTree _whereOpatternMatchWarnings _whereOsubstitution _whereOtypeschemeMap _whereOunboundNames _whereOuniqueChunk)
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3501 _whereIassumptions
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3502 _whereIconstraints
_guardedexpressionsOnumberOfGuards = rule3503 _guardedexpressionsIconstraintslist
_whereOassumptions = rule3504 _guardedexpressionsIassumptions
_whereOconstraints = rule3505 _guardedexpressionsIconstraintslist
_allTypeSchemes = rule3506 _lhsIallTypeSchemes _whereIlocalTypes
_localInfo = rule3507 _lhsImonos _self
_parentTree = rule3508 _guardedexpressionsIinfoTrees _lhsIparentTree _localInfo _whereIinfoTrees
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3509 _parentTree
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3510 _whereIunboundNames
_guardedexpressionsOnamesInScope = rule3511 _whereInamesInScope
_whereOunboundNames = rule3512 _guardedexpressionsIunboundNames
_guardedexpressionsOuniqueSecondRound = rule3513 _guardedexpressionsIbetaUnique
_whereObetaUnique = rule3514 _guardedexpressionsIuniqueSecondRound
_lhsOfallthrough :: Bool
_lhsOfallthrough = rule3515 _guardedexpressionsIfallthrough
_guardedexpressionsOopen = rule3516 ()
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3517 _guardedexpressionsIfallthrough _rangeIself _whereIpatternMatchWarnings
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3518 _guardedexpressionsIcollectInstances _whereIcollectInstances
_self = rule3519 _guardedexpressionsIself _rangeIself _whereIself
_lhsOself :: RightHandSide
_lhsOself = rule3520 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3521 _whereIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3522 _whereIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3523 _whereIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3524 _whereIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3525 _whereIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3526 _whereImatchIO
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3527 _whereIuniqueChunk
_guardedexpressionsOallPatterns = rule3528 _lhsIallPatterns
_guardedexpressionsOallTypeSchemes = rule3529 _allTypeSchemes
_guardedexpressionsOavailablePredicates = rule3530 _lhsIavailablePredicates
_guardedexpressionsObetaRight = rule3531 _lhsIbetaRight
_guardedexpressionsObetaUnique = rule3532 _lhsIbetaUnique
_guardedexpressionsOclassEnvironment = rule3533 _lhsIclassEnvironment
_guardedexpressionsOcollectErrors = rule3534 _lhsIcollectErrors
_guardedexpressionsOcollectWarnings = rule3535 _lhsIcollectWarnings
_guardedexpressionsOcounter = rule3536 _lhsIcounter
_guardedexpressionsOcurrentChunk = rule3537 _lhsIcurrentChunk
_guardedexpressionsOdictionaryEnvironment = rule3538 _lhsIdictionaryEnvironment
_guardedexpressionsOimportEnvironment = rule3539 _lhsIimportEnvironment
_guardedexpressionsOmatchIO = rule3540 _lhsImatchIO
_guardedexpressionsOmonos = rule3541 _lhsImonos
_guardedexpressionsOorderedTypeSynonyms = rule3542 _lhsIorderedTypeSynonyms
_guardedexpressionsOparentTree = rule3543 _parentTree
_guardedexpressionsOpatternMatchWarnings = rule3544 _lhsIpatternMatchWarnings
_guardedexpressionsOsubstitution = rule3545 _lhsIsubstitution
_guardedexpressionsOtypeschemeMap = rule3546 _lhsItypeschemeMap
_guardedexpressionsOuniqueChunk = rule3547 _lhsIuniqueChunk
_whereOallPatterns = rule3548 _lhsIallPatterns
_whereOallTypeSchemes = rule3549 _allTypeSchemes
_whereOavailablePredicates = rule3550 _lhsIavailablePredicates
_whereOclassEnvironment = rule3551 _lhsIclassEnvironment
_whereOcollectErrors = rule3552 _guardedexpressionsIcollectErrors
_whereOcollectWarnings = rule3553 _guardedexpressionsIcollectWarnings
_whereOcounter = rule3554 _guardedexpressionsIcounter
_whereOcurrentChunk = rule3555 _lhsIcurrentChunk
_whereOdictionaryEnvironment = rule3556 _guardedexpressionsIdictionaryEnvironment
_whereOimportEnvironment = rule3557 _lhsIimportEnvironment
_whereOmatchIO = rule3558 _guardedexpressionsImatchIO
_whereOmonos = rule3559 _lhsImonos
_whereOnamesInScope = rule3560 _lhsInamesInScope
_whereOorderedTypeSynonyms = rule3561 _lhsIorderedTypeSynonyms
_whereOparentTree = rule3562 _parentTree
_whereOpatternMatchWarnings = rule3563 _guardedexpressionsIpatternMatchWarnings
_whereOsubstitution = rule3564 _lhsIsubstitution
_whereOtypeschemeMap = rule3565 _lhsItypeschemeMap
_whereOuniqueChunk = rule3566 _guardedexpressionsIuniqueChunk
__result_ = T_RightHandSide_vOut148 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOfallthrough _lhsOinfoTree _lhsOmatchIO _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk
in __result_ )
in C_RightHandSide_s149 v148
rule3501 = \ ((_whereIassumptions) :: Assumptions) ->
_whereIassumptions
rule3502 = \ ((_whereIconstraints) :: ConstraintSet) ->
_whereIconstraints
rule3503 = \ ((_guardedexpressionsIconstraintslist) :: ConstraintSets) ->
length _guardedexpressionsIconstraintslist
rule3504 = \ ((_guardedexpressionsIassumptions) :: Assumptions) ->
_guardedexpressionsIassumptions
rule3505 = \ ((_guardedexpressionsIconstraintslist) :: ConstraintSets) ->
Node _guardedexpressionsIconstraintslist
rule3506 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ((_whereIlocalTypes) :: M.Map NameWithRange TpScheme) ->
_whereIlocalTypes `M.union` _lhsIallTypeSchemes
rule3507 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_RHS _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule3508 = \ ((_guardedexpressionsIinfoTrees) :: InfoTrees) ((_lhsIparentTree) :: InfoTree) _localInfo ((_whereIinfoTrees) :: InfoTrees) ->
node _lhsIparentTree _localInfo (_guardedexpressionsIinfoTrees ++ _whereIinfoTrees)
rule3509 = \ _parentTree ->
_parentTree
rule3510 = \ ((_whereIunboundNames) :: Names) ->
_whereIunboundNames
rule3511 = \ ((_whereInamesInScope) :: Names) ->
_whereInamesInScope
rule3512 = \ ((_guardedexpressionsIunboundNames) :: Names) ->
_guardedexpressionsIunboundNames
rule3513 = \ ((_guardedexpressionsIbetaUnique) :: Int) ->
_guardedexpressionsIbetaUnique
rule3514 = \ ((_guardedexpressionsIuniqueSecondRound) :: Int) ->
_guardedexpressionsIuniqueSecondRound
rule3515 = \ ((_guardedexpressionsIfallthrough) :: Bool) ->
_guardedexpressionsIfallthrough
rule3516 = \ (_ :: ()) ->
True
rule3517 = \ ((_guardedexpressionsIfallthrough) :: Bool) ((_rangeIself) :: Range) ((_whereIpatternMatchWarnings) :: [Warning]) ->
(if _guardedexpressionsIfallthrough then [FallThrough _rangeIself] else [])
++ _whereIpatternMatchWarnings
rule3518 = \ ((_guardedexpressionsIcollectInstances) :: [(Name, Instance)]) ((_whereIcollectInstances) :: [(Name, Instance)]) ->
_guardedexpressionsIcollectInstances ++ _whereIcollectInstances
rule3519 = \ ((_guardedexpressionsIself) :: GuardedExpressions) ((_rangeIself) :: Range) ((_whereIself) :: MaybeDeclarations) ->
RightHandSide_Guarded _rangeIself _guardedexpressionsIself _whereIself
rule3520 = \ _self ->
_self
rule3521 = \ ((_whereIbetaUnique) :: Int) ->
_whereIbetaUnique
rule3522 = \ ((_whereIcollectErrors) :: TypeErrors) ->
_whereIcollectErrors
rule3523 = \ ((_whereIcollectWarnings) :: Warnings) ->
_whereIcollectWarnings
rule3524 = \ ((_whereIcounter) :: Int) ->
_whereIcounter
rule3525 = \ ((_whereIdictionaryEnvironment) :: DictionaryEnvironment) ->
_whereIdictionaryEnvironment
rule3526 = \ ((_whereImatchIO) :: IO ()) ->
_whereImatchIO
rule3527 = \ ((_whereIuniqueChunk) :: Int) ->
_whereIuniqueChunk
rule3528 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3529 = \ _allTypeSchemes ->
_allTypeSchemes
rule3530 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3531 = \ ((_lhsIbetaRight) :: Tp) ->
_lhsIbetaRight
rule3532 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3533 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3534 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3535 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3536 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3537 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3538 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3539 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3540 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3541 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3542 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3543 = \ _parentTree ->
_parentTree
rule3544 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3545 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3546 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3547 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3548 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3549 = \ _allTypeSchemes ->
_allTypeSchemes
rule3550 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3551 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3552 = \ ((_guardedexpressionsIcollectErrors) :: TypeErrors) ->
_guardedexpressionsIcollectErrors
rule3553 = \ ((_guardedexpressionsIcollectWarnings) :: Warnings) ->
_guardedexpressionsIcollectWarnings
rule3554 = \ ((_guardedexpressionsIcounter) :: Int) ->
_guardedexpressionsIcounter
rule3555 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3556 = \ ((_guardedexpressionsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_guardedexpressionsIdictionaryEnvironment
rule3557 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3558 = \ ((_guardedexpressionsImatchIO) :: IO ()) ->
_guardedexpressionsImatchIO
rule3559 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3560 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3561 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3562 = \ _parentTree ->
_parentTree
rule3563 = \ ((_guardedexpressionsIpatternMatchWarnings) :: [Warning]) ->
_guardedexpressionsIpatternMatchWarnings
rule3564 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3565 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3566 = \ ((_guardedexpressionsIuniqueChunk) :: Int) ->
_guardedexpressionsIuniqueChunk
data Inh_SimpleType = Inh_SimpleType { }
data Syn_SimpleType = Syn_SimpleType { name_Syn_SimpleType :: (Name), self_Syn_SimpleType :: (SimpleType), typevariables_Syn_SimpleType :: (Names) }
wrap_SimpleType :: T_SimpleType -> Inh_SimpleType -> (Syn_SimpleType )
wrap_SimpleType (T_SimpleType act) (Inh_SimpleType ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_SimpleType_vIn151
(T_SimpleType_vOut151 _lhsOname _lhsOself _lhsOtypevariables) <- return (inv_SimpleType_s152 sem arg)
return (Syn_SimpleType _lhsOname _lhsOself _lhsOtypevariables)
)
sem_SimpleType :: SimpleType -> T_SimpleType
sem_SimpleType ( SimpleType_SimpleType range_ name_ typevariables_ ) = sem_SimpleType_SimpleType ( sem_Range range_ ) ( sem_Name name_ ) ( sem_Names typevariables_ )
newtype T_SimpleType = T_SimpleType {
attach_T_SimpleType :: Identity (T_SimpleType_s152 )
}
newtype T_SimpleType_s152 = C_SimpleType_s152 {
inv_SimpleType_s152 :: (T_SimpleType_v151 )
}
data T_SimpleType_s153 = C_SimpleType_s153
type T_SimpleType_v151 = (T_SimpleType_vIn151 ) -> (T_SimpleType_vOut151 )
data T_SimpleType_vIn151 = T_SimpleType_vIn151
data T_SimpleType_vOut151 = T_SimpleType_vOut151 (Name) (SimpleType) (Names)
sem_SimpleType_SimpleType :: T_Range -> T_Name -> T_Names -> T_SimpleType
sem_SimpleType_SimpleType arg_range_ arg_name_ arg_typevariables_ = T_SimpleType (return st152) where
st152 = let
v151 :: T_SimpleType_v151
v151 = \ (T_SimpleType_vIn151 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
_typevariablesX116 = Control.Monad.Identity.runIdentity (attach_T_Names (arg_typevariables_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
(T_Names_vOut115 _typevariablesIself) = inv_Names_s116 _typevariablesX116 (T_Names_vIn115 )
_lhsOname :: Name
_lhsOname = rule3567 _nameIself
_lhsOtypevariables :: Names
_lhsOtypevariables = rule3568 _typevariablesIself
_self = rule3569 _nameIself _rangeIself _typevariablesIself
_lhsOself :: SimpleType
_lhsOself = rule3570 _self
__result_ = T_SimpleType_vOut151 _lhsOname _lhsOself _lhsOtypevariables
in __result_ )
in C_SimpleType_s152 v151
rule3567 = \ ((_nameIself) :: Name) ->
_nameIself
rule3568 = \ ((_typevariablesIself) :: Names) ->
_typevariablesIself
rule3569 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ((_typevariablesIself) :: Names) ->
SimpleType_SimpleType _rangeIself _nameIself _typevariablesIself
rule3570 = \ _self ->
_self
data Inh_Statement = Inh_Statement { allPatterns_Inh_Statement :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Statement :: (M.Map NameWithRange TpScheme), assumptions_Inh_Statement :: (Assumptions), availablePredicates_Inh_Statement :: (Predicates), betaUnique_Inh_Statement :: (Int), classEnvironment_Inh_Statement :: (ClassEnvironment), collectErrors_Inh_Statement :: (TypeErrors), collectWarnings_Inh_Statement :: (Warnings), constraints_Inh_Statement :: (ConstraintSet), counter_Inh_Statement :: (Int), currentChunk_Inh_Statement :: (Int), dictionaryEnvironment_Inh_Statement :: (DictionaryEnvironment), generatorBeta_Inh_Statement :: (Maybe Tp), importEnvironment_Inh_Statement :: (ImportEnvironment), matchIO_Inh_Statement :: (IO ()), monos_Inh_Statement :: (Monos), namesInScope_Inh_Statement :: (Names), orderedTypeSynonyms_Inh_Statement :: (OrderedTypeSynonyms), parentTree_Inh_Statement :: (InfoTree), patternMatchWarnings_Inh_Statement :: ([Warning]), substitution_Inh_Statement :: (FixpointSubstitution), typeschemeMap_Inh_Statement :: (M.Map Int (Scheme Predicates)), unboundNames_Inh_Statement :: (Names), uniqueChunk_Inh_Statement :: (Int), uniqueSecondRound_Inh_Statement :: (Int) }
data Syn_Statement = Syn_Statement { assumptions_Syn_Statement :: (Assumptions), betaUnique_Syn_Statement :: (Int), collectErrors_Syn_Statement :: (TypeErrors), collectInstances_Syn_Statement :: ([(Name, Instance)]), collectWarnings_Syn_Statement :: (Warnings), constraints_Syn_Statement :: (ConstraintSet), counter_Syn_Statement :: (Int), dictionaryEnvironment_Syn_Statement :: (DictionaryEnvironment), generatorBeta_Syn_Statement :: (Maybe Tp), infoTree_Syn_Statement :: (InfoTree), matchIO_Syn_Statement :: (IO ()), monos_Syn_Statement :: (Monos), namesInScope_Syn_Statement :: (Names), patternMatchWarnings_Syn_Statement :: ([Warning]), self_Syn_Statement :: (Statement), unboundNames_Syn_Statement :: (Names), uniqueChunk_Syn_Statement :: (Int), uniqueSecondRound_Syn_Statement :: (Int) }
wrap_Statement :: T_Statement -> Inh_Statement -> (Syn_Statement )
wrap_Statement (T_Statement act) (Inh_Statement _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIgeneratorBeta _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Statement_vIn154 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIgeneratorBeta _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound
(T_Statement_vOut154 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOgeneratorBeta _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound) <- return (inv_Statement_s155 sem arg)
return (Syn_Statement _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOgeneratorBeta _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound)
)
sem_Statement :: Statement -> T_Statement
sem_Statement ( Statement_Expression range_ expression_ ) = sem_Statement_Expression ( sem_Range range_ ) ( sem_Expression expression_ )
sem_Statement ( Statement_Let range_ declarations_ ) = sem_Statement_Let ( sem_Range range_ ) ( sem_Declarations declarations_ )
sem_Statement ( Statement_Generator range_ pattern_ expression_ ) = sem_Statement_Generator ( sem_Range range_ ) ( sem_Pattern pattern_ ) ( sem_Expression expression_ )
sem_Statement ( Statement_Empty range_ ) = sem_Statement_Empty ( sem_Range range_ )
newtype T_Statement = T_Statement {
attach_T_Statement :: Identity (T_Statement_s155 )
}
newtype T_Statement_s155 = C_Statement_s155 {
inv_Statement_s155 :: (T_Statement_v154 )
}
data T_Statement_s156 = C_Statement_s156
type T_Statement_v154 = (T_Statement_vIn154 ) -> (T_Statement_vOut154 )
data T_Statement_vIn154 = T_Statement_vIn154 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Assumptions) (Predicates) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (ConstraintSet) (Int) (Int) (DictionaryEnvironment) (Maybe Tp) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Names) (Int) (Int)
data T_Statement_vOut154 = T_Statement_vOut154 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) (Maybe Tp) (InfoTree) (IO ()) (Monos) (Names) ([Warning]) (Statement) (Names) (Int) (Int)
sem_Statement_Expression :: T_Range -> T_Expression -> T_Statement
sem_Statement_Expression arg_range_ arg_expression_ = T_Statement (return st155) where
st155 = let
v154 :: T_Statement_v154
v154 = \ (T_Statement_vIn154 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIgeneratorBeta _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_lhsOgeneratorBeta :: Maybe Tp
_lhsOgeneratorBeta = rule3571 _beta
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3572 _expressionIassumptions _lhsIassumptions
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3573 _locConstraints
_expressionObetaUnique = rule3574 _lhsIbetaUnique
_locConstraints = rule3575 _expressionIconstraints _lhsIconstraints _newcon
_beta = rule3576 _lhsIbetaUnique
_newcon = rule3577 _beta _cinfo _expressionIbeta
_cinfo = rule3578 _parentTree
_localInfo = rule3579 _lhsImonos _self
_parentTree = rule3580 _expressionIinfoTree _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3581 _parentTree
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3582 _expressionIunboundNames _lhsIunboundNames
_expressionOtryPatterns = rule3583 ()
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3584 _expressionIcollectInstances
_self = rule3585 _expressionIself _rangeIself
_lhsOself :: Statement
_lhsOself = rule3586 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3587 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3588 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3589 _expressionIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3590 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3591 _expressionIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3592 _expressionImatchIO
_lhsOmonos :: Monos
_lhsOmonos = rule3593 _lhsImonos
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3594 _lhsInamesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3595 _expressionIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3596 _expressionIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3597 _expressionIuniqueSecondRound
_expressionOallPatterns = rule3598 _lhsIallPatterns
_expressionOallTypeSchemes = rule3599 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule3600 _lhsIavailablePredicates
_expressionOclassEnvironment = rule3601 _lhsIclassEnvironment
_expressionOcollectErrors = rule3602 _lhsIcollectErrors
_expressionOcollectWarnings = rule3603 _lhsIcollectWarnings
_expressionOcounter = rule3604 _lhsIcounter
_expressionOcurrentChunk = rule3605 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule3606 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule3607 _lhsIimportEnvironment
_expressionOmatchIO = rule3608 _lhsImatchIO
_expressionOmonos = rule3609 _lhsImonos
_expressionOnamesInScope = rule3610 _lhsInamesInScope
_expressionOorderedTypeSynonyms = rule3611 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule3612 _parentTree
_expressionOpatternMatchWarnings = rule3613 _lhsIpatternMatchWarnings
_expressionOsubstitution = rule3614 _lhsIsubstitution
_expressionOtypeschemeMap = rule3615 _lhsItypeschemeMap
_expressionOuniqueChunk = rule3616 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule3617 _lhsIuniqueSecondRound
__result_ = T_Statement_vOut154 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOgeneratorBeta _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Statement_s155 v154
rule3571 = \ _beta ->
Just _beta
rule3572 = \ ((_expressionIassumptions) :: Assumptions) ((_lhsIassumptions) :: Assumptions) ->
_lhsIassumptions `combine` _expressionIassumptions
rule3573 = \ _locConstraints ->
_locConstraints
rule3574 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique + 1
rule3575 = \ ((_expressionIconstraints) :: ConstraintSet) ((_lhsIconstraints) :: ConstraintSet) _newcon ->
Node [ _newcon .<. _expressionIconstraints
, _lhsIconstraints
]
rule3576 = \ ((_lhsIbetaUnique) :: Int) ->
TVar _lhsIbetaUnique
rule3577 = \ _beta _cinfo ((_expressionIbeta) :: Tp) ->
[ (_expressionIbeta .==. ioType _beta) _cinfo ]
rule3578 = \ _parentTree ->
orphanConstraint 0 "generator" _parentTree
[]
rule3579 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Stat _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule3580 = \ ((_expressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo [_expressionIinfoTree]
rule3581 = \ _parentTree ->
_parentTree
rule3582 = \ ((_expressionIunboundNames) :: Names) ((_lhsIunboundNames) :: Names) ->
_expressionIunboundNames ++ _lhsIunboundNames
rule3583 = \ (_ :: ()) ->
[]
rule3584 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule3585 = \ ((_expressionIself) :: Expression) ((_rangeIself) :: Range) ->
Statement_Expression _rangeIself _expressionIself
rule3586 = \ _self ->
_self
rule3587 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule3588 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule3589 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule3590 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule3591 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule3592 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule3593 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3594 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3595 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ->
_expressionIpatternMatchWarnings
rule3596 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule3597 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule3598 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3599 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3600 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3601 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3602 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3603 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3604 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3605 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3606 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3607 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3608 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3609 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3610 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3611 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3612 = \ _parentTree ->
_parentTree
rule3613 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3614 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3615 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3616 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3617 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Statement_Let :: T_Range -> T_Declarations -> T_Statement
sem_Statement_Let arg_range_ arg_declarations_ = T_Statement (return st155) where
st155 = let
v154 :: T_Statement_v154
v154 = \ (T_Statement_vIn154 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIgeneratorBeta _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_declarationsX32 = Control.Monad.Identity.runIdentity (attach_T_Declarations (arg_declarations_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Declarations_vOut31 _declarationsIbetaUnique _declarationsIbindingGroups _declarationsIcollectErrors _declarationsIcollectInstances _declarationsIcollectWarnings _declarationsIcounter _declarationsIdeclVarNames _declarationsIdictionaryEnvironment _declarationsIinfoTrees _declarationsImatchIO _declarationsIpatternMatchWarnings _declarationsIrestrictedNames _declarationsIself _declarationsIsimplePatNames _declarationsItypeSignatures _declarationsIunboundNames _declarationsIuniqueChunk) = inv_Declarations_s32 _declarationsX32 (T_Declarations_vIn31 _declarationsOallPatterns _declarationsOallTypeSchemes _declarationsOavailablePredicates _declarationsObetaUnique _declarationsObindingGroups _declarationsOclassEnvironment _declarationsOcollectErrors _declarationsOcollectWarnings _declarationsOcounter _declarationsOcurrentChunk _declarationsOdictionaryEnvironment _declarationsOimportEnvironment _declarationsOinheritedBDG _declarationsOmatchIO _declarationsOmonos _declarationsOnamesInScope _declarationsOorderedTypeSynonyms _declarationsOparentTree _declarationsOpatternMatchWarnings _declarationsOsubstitution _declarationsOtypeSignatures _declarationsOtypeschemeMap _declarationsOuniqueChunk)
_lhsOgeneratorBeta :: Maybe Tp
_lhsOgeneratorBeta = rule3618 ()
_declarationsObindingGroups = rule3619 ()
_lhsOassumptions :: Assumptions
_lhsOconstraints :: ConstraintSet
_lhsObetaUnique :: Int
(_lhsOassumptions,_lhsOconstraints,_inheritedBDG,_chunkNr,_lhsObetaUnique,_implicitsFM) = rule3620 _declarationsIbetaUnique _declarationsIbindingGroups _declarationsItypeSignatures _declarationsIuniqueChunk _lhsIassumptions _lhsIconstraints _lhsIcurrentChunk _lhsImonos
_inferredTypes = rule3621 _implicitsFM _lhsItypeschemeMap
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3622 _declarationsIcollectWarnings _declarationsIsimplePatNames _inferredTypes
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3623 _declarationsIcollectErrors _declarationsIrestrictedNames _inferredTypes
_allTypeSchemes = rule3624 _lhsIallTypeSchemes _localTypes
_localTypes = rule3625 _declarationsIbindingGroups _declarationsItypeSignatures _inferredTypes
_declarationsOtypeSignatures = rule3626 ()
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3627 _chunkNr
_localInfo = rule3628 _lhsImonos _self
_declInfo = rule3629 _declarationsIself _lhsImonos
_thisTree = rule3630 _declTree _lhsIparentTree _localInfo
_declTree = rule3631 _declInfo _declarationsIinfoTrees _thisTree
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3632 _thisTree
_declarationsOparentTree = rule3633 _declTree
(_collectTypeConstructors,_collectValueConstructors,_collectTypeSynonyms,_collectConstructorEnv,_derivedFunctions,_operatorFixities) = rule3634 ()
(_namesInScope,_unboundNames,_scopeInfo) = rule3635 _declarationsIdeclVarNames _declarationsIunboundNames _lhsInamesInScope _lhsIunboundNames
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3636 _unboundNames
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3637 _declarationsIcollectInstances
_self = rule3638 _declarationsIself _rangeIself
_lhsOself :: Statement
_lhsOself = rule3639 _self
_lhsOcounter :: Int
_lhsOcounter = rule3640 _declarationsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3641 _declarationsIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3642 _declarationsImatchIO
_lhsOmonos :: Monos
_lhsOmonos = rule3643 _lhsImonos
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3644 _namesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3645 _declarationsIpatternMatchWarnings
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3646 _lhsIuniqueSecondRound
_declarationsOallPatterns = rule3647 _lhsIallPatterns
_declarationsOallTypeSchemes = rule3648 _allTypeSchemes
_declarationsOavailablePredicates = rule3649 _lhsIavailablePredicates
_declarationsObetaUnique = rule3650 _lhsIbetaUnique
_declarationsOclassEnvironment = rule3651 _lhsIclassEnvironment
_declarationsOcollectErrors = rule3652 _lhsIcollectErrors
_declarationsOcollectWarnings = rule3653 _lhsIcollectWarnings
_declarationsOcounter = rule3654 _lhsIcounter
_declarationsOcurrentChunk = rule3655 _lhsIcurrentChunk
_declarationsOdictionaryEnvironment = rule3656 _lhsIdictionaryEnvironment
_declarationsOimportEnvironment = rule3657 _lhsIimportEnvironment
_declarationsOinheritedBDG = rule3658 _inheritedBDG
_declarationsOmatchIO = rule3659 _lhsImatchIO
_declarationsOmonos = rule3660 _lhsImonos
_declarationsOnamesInScope = rule3661 _namesInScope
_declarationsOorderedTypeSynonyms = rule3662 _lhsIorderedTypeSynonyms
_declarationsOpatternMatchWarnings = rule3663 _lhsIpatternMatchWarnings
_declarationsOsubstitution = rule3664 _lhsIsubstitution
_declarationsOtypeschemeMap = rule3665 _lhsItypeschemeMap
_declarationsOuniqueChunk = rule3666 _lhsIuniqueChunk
__result_ = T_Statement_vOut154 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOgeneratorBeta _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Statement_s155 v154
rule3618 = \ (_ :: ()) ->
Nothing
rule3619 = \ (_ :: ()) ->
[]
rule3620 = \ ((_declarationsIbetaUnique) :: Int) ((_declarationsIbindingGroups) :: BindingGroups) ((_declarationsItypeSignatures) :: TypeEnvironment) ((_declarationsIuniqueChunk) :: Int) ((_lhsIassumptions) :: Assumptions) ((_lhsIconstraints) :: ConstraintSet) ((_lhsIcurrentChunk) :: Int) ((_lhsImonos) :: Monos) ->
let inputBDG = (False, _lhsIcurrentChunk, _declarationsIuniqueChunk, _lhsImonos, _declarationsItypeSignatures, mybdggroup, _declarationsIbetaUnique)
mybdggroup = Just (_lhsIassumptions, [_lhsIconstraints])
in performBindingGroup inputBDG _declarationsIbindingGroups
rule3621 = \ _implicitsFM ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
findInferredTypes _lhsItypeschemeMap _implicitsFM
rule3622 = \ ((_declarationsIcollectWarnings) :: Warnings) ((_declarationsIsimplePatNames) :: Names) _inferredTypes ->
missingTypeSignature False _declarationsIsimplePatNames _inferredTypes
++ _declarationsIcollectWarnings
rule3623 = \ ((_declarationsIcollectErrors) :: TypeErrors) ((_declarationsIrestrictedNames) :: Names) _inferredTypes ->
restrictedNameErrors _inferredTypes _declarationsIrestrictedNames
++ _declarationsIcollectErrors
rule3624 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) _localTypes ->
_localTypes `M.union` _lhsIallTypeSchemes
rule3625 = \ ((_declarationsIbindingGroups) :: BindingGroups) ((_declarationsItypeSignatures) :: TypeEnvironment) _inferredTypes ->
makeLocalTypeEnv (_declarationsItypeSignatures `M.union` _inferredTypes) _declarationsIbindingGroups
rule3626 = \ (_ :: ()) ->
M.empty
rule3627 = \ _chunkNr ->
_chunkNr
rule3628 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Stat _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule3629 = \ ((_declarationsIself) :: Declarations) ((_lhsImonos) :: Monos) ->
LocalInfo { self = UHA_Decls _declarationsIself
, assignedType = Nothing
, monos = _lhsImonos
}
rule3630 = \ _declTree ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo [_declTree]
rule3631 = \ _declInfo ((_declarationsIinfoTrees) :: InfoTrees) _thisTree ->
node _thisTree _declInfo _declarationsIinfoTrees
rule3632 = \ _thisTree ->
_thisTree
rule3633 = \ _declTree ->
_declTree
rule3634 = \ (_ :: ()) ->
internalError "PartialSyntax.ag" "n/a" "toplevel Statement"
rule3635 = \ ((_declarationsIdeclVarNames) :: Names) ((_declarationsIunboundNames) :: Names) ((_lhsInamesInScope) :: Names) ((_lhsIunboundNames) :: Names) ->
changeOfScope _declarationsIdeclVarNames (_declarationsIunboundNames ++ _lhsIunboundNames) _lhsInamesInScope
rule3636 = \ _unboundNames ->
_unboundNames
rule3637 = \ ((_declarationsIcollectInstances) :: [(Name, Instance)]) ->
_declarationsIcollectInstances
rule3638 = \ ((_declarationsIself) :: Declarations) ((_rangeIself) :: Range) ->
Statement_Let _rangeIself _declarationsIself
rule3639 = \ _self ->
_self
rule3640 = \ ((_declarationsIcounter) :: Int) ->
_declarationsIcounter
rule3641 = \ ((_declarationsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_declarationsIdictionaryEnvironment
rule3642 = \ ((_declarationsImatchIO) :: IO ()) ->
_declarationsImatchIO
rule3643 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3644 = \ _namesInScope ->
_namesInScope
rule3645 = \ ((_declarationsIpatternMatchWarnings) :: [Warning]) ->
_declarationsIpatternMatchWarnings
rule3646 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule3647 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3648 = \ _allTypeSchemes ->
_allTypeSchemes
rule3649 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3650 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3651 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3652 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3653 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3654 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3655 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3656 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3657 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3658 = \ _inheritedBDG ->
_inheritedBDG
rule3659 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3660 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3661 = \ _namesInScope ->
_namesInScope
rule3662 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3663 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3664 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3665 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3666 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
sem_Statement_Generator :: T_Range -> T_Pattern -> T_Expression -> T_Statement
sem_Statement_Generator arg_range_ arg_pattern_ arg_expression_ = T_Statement (return st155) where
st155 = let
v154 :: T_Statement_v154
v154 = \ (T_Statement_vIn154 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIgeneratorBeta _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_patternX119 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))
_expressionX41 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_expression_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Pattern_vOut118 _patternIbeta _patternIbetaUnique _patternIconstraints _patternIcounter _patternIelements _patternIenvironment _patternIinfoTree _patternIpatVarNames _patternIpatternMatchWarnings _patternIself _patternIunboundNames) = inv_Pattern_s119 _patternX119 (T_Pattern_vIn118 _patternObetaUnique _patternOcounter _patternOimportEnvironment _patternOmonos _patternOnamesInScope _patternOparentTree _patternOpatternMatchWarnings)
(T_Expression_vOut40 _expressionIassumptions _expressionIbeta _expressionIbetaUnique _expressionIcollectErrors _expressionIcollectInstances _expressionIcollectWarnings _expressionIconstraints _expressionIcounter _expressionIdictionaryEnvironment _expressionIinfoTree _expressionImatchIO _expressionImatches _expressionIpatternMatchWarnings _expressionIself _expressionIunboundNames _expressionIuniqueChunk _expressionIuniqueSecondRound) = inv_Expression_s41 _expressionX41 (T_Expression_vIn40 _expressionOallPatterns _expressionOallTypeSchemes _expressionOavailablePredicates _expressionObetaUnique _expressionOclassEnvironment _expressionOcollectErrors _expressionOcollectWarnings _expressionOcounter _expressionOcurrentChunk _expressionOdictionaryEnvironment _expressionOimportEnvironment _expressionOmatchIO _expressionOmonos _expressionOnamesInScope _expressionOorderedTypeSynonyms _expressionOparentTree _expressionOpatternMatchWarnings _expressionOsubstitution _expressionOtryPatterns _expressionOtypeschemeMap _expressionOuniqueChunk _expressionOuniqueSecondRound)
_lhsOgeneratorBeta :: Maybe Tp
_lhsOgeneratorBeta = rule3667 ()
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3668 _locConstraints
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3669 _assumptions' _expressionIassumptions
_lhsOmonos :: Monos
_lhsOmonos = rule3670 _csetBinds _lhsImonos _patternIenvironment
_locConstraints = rule3671 _csetBinds _expressionIconstraints _lhsIconstraints _newcon _patternIconstraints
_newcon = rule3672 _cinfoResult _expressionIbeta _patternIbeta
(_csetBinds,_assumptions') = rule3673 _cinfoBind _lhsIassumptions _patternIenvironment
_cinfoResult = rule3674 _parentTree
_cinfoBind = rule3675 _parentTree _patternIenvironment
_localInfo = rule3676 _lhsImonos _self
_parentTree = rule3677 _expressionIinfoTree _lhsIparentTree _localInfo _patternIinfoTree
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3678 _parentTree
(_namesInScope,_unboundNames,_scopeInfo) = rule3679 _expressionIunboundNames _lhsInamesInScope _lhsIunboundNames _patternIpatVarNames
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3680 _namesInScope
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3681 _unboundNames
_expressionOnamesInScope = rule3682 _lhsInamesInScope
_expressionOtryPatterns = rule3683 ()
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3684 _expressionIpatternMatchWarnings _lhsIimportEnvironment _lhsIsubstitution _patternIbeta _patternIelements _rangeIself
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3685 _expressionIcollectInstances
_self = rule3686 _expressionIself _patternIself _rangeIself
_lhsOself :: Statement
_lhsOself = rule3687 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3688 _expressionIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3689 _expressionIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3690 _expressionIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3691 _expressionIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3692 _expressionIdictionaryEnvironment
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3693 _expressionImatchIO
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3694 _expressionIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3695 _expressionIuniqueSecondRound
_patternObetaUnique = rule3696 _lhsIbetaUnique
_patternOcounter = rule3697 _lhsIcounter
_patternOimportEnvironment = rule3698 _lhsIimportEnvironment
_patternOmonos = rule3699 _lhsImonos
_patternOnamesInScope = rule3700 _namesInScope
_patternOparentTree = rule3701 _parentTree
_patternOpatternMatchWarnings = rule3702 _lhsIpatternMatchWarnings
_expressionOallPatterns = rule3703 _lhsIallPatterns
_expressionOallTypeSchemes = rule3704 _lhsIallTypeSchemes
_expressionOavailablePredicates = rule3705 _lhsIavailablePredicates
_expressionObetaUnique = rule3706 _patternIbetaUnique
_expressionOclassEnvironment = rule3707 _lhsIclassEnvironment
_expressionOcollectErrors = rule3708 _lhsIcollectErrors
_expressionOcollectWarnings = rule3709 _lhsIcollectWarnings
_expressionOcounter = rule3710 _patternIcounter
_expressionOcurrentChunk = rule3711 _lhsIcurrentChunk
_expressionOdictionaryEnvironment = rule3712 _lhsIdictionaryEnvironment
_expressionOimportEnvironment = rule3713 _lhsIimportEnvironment
_expressionOmatchIO = rule3714 _lhsImatchIO
_expressionOmonos = rule3715 _lhsImonos
_expressionOorderedTypeSynonyms = rule3716 _lhsIorderedTypeSynonyms
_expressionOparentTree = rule3717 _parentTree
_expressionOpatternMatchWarnings = rule3718 _patternIpatternMatchWarnings
_expressionOsubstitution = rule3719 _lhsIsubstitution
_expressionOtypeschemeMap = rule3720 _lhsItypeschemeMap
_expressionOuniqueChunk = rule3721 _lhsIuniqueChunk
_expressionOuniqueSecondRound = rule3722 _lhsIuniqueSecondRound
__result_ = T_Statement_vOut154 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOgeneratorBeta _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Statement_s155 v154
rule3667 = \ (_ :: ()) ->
Nothing
rule3668 = \ _locConstraints ->
_locConstraints
rule3669 = \ _assumptions' ((_expressionIassumptions) :: Assumptions) ->
_assumptions' `combine` _expressionIassumptions
rule3670 = \ _csetBinds ((_lhsImonos) :: Monos) ((_patternIenvironment) :: PatternAssumptions) ->
M.elems _patternIenvironment ++ getMonos _csetBinds ++ _lhsImonos
rule3671 = \ _csetBinds ((_expressionIconstraints) :: ConstraintSet) ((_lhsIconstraints) :: ConstraintSet) _newcon ((_patternIconstraints) :: ConstraintSet) ->
_newcon .>. _csetBinds .>>.
Node [ _patternIconstraints
, _expressionIconstraints
, _lhsIconstraints
]
rule3672 = \ _cinfoResult ((_expressionIbeta) :: Tp) ((_patternIbeta) :: Tp) ->
[ (_expressionIbeta .==. ioType _patternIbeta) _cinfoResult ]
rule3673 = \ _cinfoBind ((_lhsIassumptions) :: Assumptions) ((_patternIenvironment) :: PatternAssumptions) ->
(_patternIenvironment .===. _lhsIassumptions) _cinfoBind
rule3674 = \ _parentTree ->
childConstraint 1 "generator" _parentTree
[]
rule3675 = \ _parentTree ((_patternIenvironment) :: PatternAssumptions) ->
\name -> variableConstraint "variable" (nameToUHA_Expr name)
[ FolkloreConstraint
, makeUnifier name "generator" _patternIenvironment _parentTree
]
rule3676 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Stat _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule3677 = \ ((_expressionIinfoTree) :: InfoTree) ((_lhsIparentTree) :: InfoTree) _localInfo ((_patternIinfoTree) :: InfoTree) ->
node _lhsIparentTree _localInfo [_patternIinfoTree, _expressionIinfoTree]
rule3678 = \ _parentTree ->
_parentTree
rule3679 = \ ((_expressionIunboundNames) :: Names) ((_lhsInamesInScope) :: Names) ((_lhsIunboundNames) :: Names) ((_patternIpatVarNames) :: Names) ->
changeOfScope _patternIpatVarNames (_expressionIunboundNames ++ _lhsIunboundNames) _lhsInamesInScope
rule3680 = \ _namesInScope ->
_namesInScope
rule3681 = \ _unboundNames ->
_unboundNames
rule3682 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3683 = \ (_ :: ()) ->
[]
rule3684 = \ ((_expressionIpatternMatchWarnings) :: [Warning]) ((_lhsIimportEnvironment) :: ImportEnvironment) ((_lhsIsubstitution) :: FixpointSubstitution) ((_patternIbeta) :: Tp) ((_patternIelements) :: [PatternElement] ) ((_rangeIself) :: Range) ->
patternMatchWarnings _lhsIimportEnvironment
_lhsIsubstitution
_patternIbeta
(:[])
[(_patternIelements, False)]
_rangeIself
Nothing
False
[]
"generator"
"<-"
++ _expressionIpatternMatchWarnings
rule3685 = \ ((_expressionIcollectInstances) :: [(Name, Instance)]) ->
_expressionIcollectInstances
rule3686 = \ ((_expressionIself) :: Expression) ((_patternIself) :: Pattern) ((_rangeIself) :: Range) ->
Statement_Generator _rangeIself _patternIself _expressionIself
rule3687 = \ _self ->
_self
rule3688 = \ ((_expressionIbetaUnique) :: Int) ->
_expressionIbetaUnique
rule3689 = \ ((_expressionIcollectErrors) :: TypeErrors) ->
_expressionIcollectErrors
rule3690 = \ ((_expressionIcollectWarnings) :: Warnings) ->
_expressionIcollectWarnings
rule3691 = \ ((_expressionIcounter) :: Int) ->
_expressionIcounter
rule3692 = \ ((_expressionIdictionaryEnvironment) :: DictionaryEnvironment) ->
_expressionIdictionaryEnvironment
rule3693 = \ ((_expressionImatchIO) :: IO ()) ->
_expressionImatchIO
rule3694 = \ ((_expressionIuniqueChunk) :: Int) ->
_expressionIuniqueChunk
rule3695 = \ ((_expressionIuniqueSecondRound) :: Int) ->
_expressionIuniqueSecondRound
rule3696 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3697 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3698 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3699 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3700 = \ _namesInScope ->
_namesInScope
rule3701 = \ _parentTree ->
_parentTree
rule3702 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3703 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3704 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3705 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3706 = \ ((_patternIbetaUnique) :: Int) ->
_patternIbetaUnique
rule3707 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3708 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3709 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3710 = \ ((_patternIcounter) :: Int) ->
_patternIcounter
rule3711 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3712 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3713 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3714 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3715 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3716 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3717 = \ _parentTree ->
_parentTree
rule3718 = \ ((_patternIpatternMatchWarnings) :: [Warning]) ->
_patternIpatternMatchWarnings
rule3719 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3720 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3721 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3722 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
sem_Statement_Empty :: T_Range -> T_Statement
sem_Statement_Empty arg_range_ = T_Statement (return st155) where
st155 = let
v154 :: T_Statement_v154
v154 = \ (T_Statement_vIn154 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIgeneratorBeta _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
_localInfo = rule3723 _lhsImonos _self
_parentTree = rule3724 _lhsIparentTree _localInfo
_lhsOinfoTree :: InfoTree
_lhsOinfoTree = rule3725 _parentTree
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3726 ()
_self = rule3727 _rangeIself
_lhsOself :: Statement
_lhsOself = rule3728 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3729 _lhsIassumptions
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3730 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3731 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3732 _lhsIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3733 _lhsIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule3734 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3735 _lhsIdictionaryEnvironment
_lhsOgeneratorBeta :: Maybe Tp
_lhsOgeneratorBeta = rule3736 _lhsIgeneratorBeta
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3737 _lhsImatchIO
_lhsOmonos :: Monos
_lhsOmonos = rule3738 _lhsImonos
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3739 _lhsInamesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3740 _lhsIpatternMatchWarnings
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3741 _lhsIunboundNames
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3742 _lhsIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3743 _lhsIuniqueSecondRound
__result_ = T_Statement_vOut154 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOgeneratorBeta _lhsOinfoTree _lhsOmatchIO _lhsOmonos _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Statement_s155 v154
rule3723 = \ ((_lhsImonos) :: Monos) _self ->
LocalInfo { self = UHA_Stat _self
, assignedType = Nothing
, monos = _lhsImonos
}
rule3724 = \ ((_lhsIparentTree) :: InfoTree) _localInfo ->
node _lhsIparentTree _localInfo []
rule3725 = \ _parentTree ->
_parentTree
rule3726 = \ (_ :: ()) ->
[]
rule3727 = \ ((_rangeIself) :: Range) ->
Statement_Empty _rangeIself
rule3728 = \ _self ->
_self
rule3729 = \ ((_lhsIassumptions) :: Assumptions) ->
_lhsIassumptions
rule3730 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3731 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3732 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3733 = \ ((_lhsIconstraints) :: ConstraintSet) ->
_lhsIconstraints
rule3734 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3735 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3736 = \ ((_lhsIgeneratorBeta) :: Maybe Tp) ->
_lhsIgeneratorBeta
rule3737 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3738 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3739 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3740 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3741 = \ ((_lhsIunboundNames) :: Names) ->
_lhsIunboundNames
rule3742 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3743 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
data Inh_Statements = Inh_Statements { allPatterns_Inh_Statements :: ([((Expression, [String]), Core_TypingStrategy)]), allTypeSchemes_Inh_Statements :: (M.Map NameWithRange TpScheme), assumptions_Inh_Statements :: (Assumptions), availablePredicates_Inh_Statements :: (Predicates), betaUnique_Inh_Statements :: (Int), classEnvironment_Inh_Statements :: (ClassEnvironment), collectErrors_Inh_Statements :: (TypeErrors), collectWarnings_Inh_Statements :: (Warnings), constraints_Inh_Statements :: (ConstraintSet), counter_Inh_Statements :: (Int), currentChunk_Inh_Statements :: (Int), dictionaryEnvironment_Inh_Statements :: (DictionaryEnvironment), generatorBeta_Inh_Statements :: (Maybe Tp), importEnvironment_Inh_Statements :: (ImportEnvironment), matchIO_Inh_Statements :: (IO ()), monos_Inh_Statements :: (Monos), namesInScope_Inh_Statements :: (Names), orderedTypeSynonyms_Inh_Statements :: (OrderedTypeSynonyms), parentTree_Inh_Statements :: (InfoTree), patternMatchWarnings_Inh_Statements :: ([Warning]), substitution_Inh_Statements :: (FixpointSubstitution), typeschemeMap_Inh_Statements :: (M.Map Int (Scheme Predicates)), unboundNames_Inh_Statements :: (Names), uniqueChunk_Inh_Statements :: (Int), uniqueSecondRound_Inh_Statements :: (Int) }
data Syn_Statements = Syn_Statements { assumptions_Syn_Statements :: (Assumptions), betaUnique_Syn_Statements :: (Int), collectErrors_Syn_Statements :: (TypeErrors), collectInstances_Syn_Statements :: ([(Name, Instance)]), collectWarnings_Syn_Statements :: (Warnings), constraints_Syn_Statements :: (ConstraintSet), counter_Syn_Statements :: (Int), dictionaryEnvironment_Syn_Statements :: (DictionaryEnvironment), generatorBeta_Syn_Statements :: (Maybe Tp), infoTrees_Syn_Statements :: (InfoTrees), matchIO_Syn_Statements :: (IO ()), namesInScope_Syn_Statements :: (Names), patternMatchWarnings_Syn_Statements :: ([Warning]), self_Syn_Statements :: (Statements), unboundNames_Syn_Statements :: (Names), uniqueChunk_Syn_Statements :: (Int), uniqueSecondRound_Syn_Statements :: (Int) }
wrap_Statements :: T_Statements -> Inh_Statements -> (Syn_Statements )
wrap_Statements (T_Statements act) (Inh_Statements _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIgeneratorBeta _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Statements_vIn157 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIgeneratorBeta _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound
(T_Statements_vOut157 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOgeneratorBeta _lhsOinfoTrees _lhsOmatchIO _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound) <- return (inv_Statements_s158 sem arg)
return (Syn_Statements _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOgeneratorBeta _lhsOinfoTrees _lhsOmatchIO _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound)
)
sem_Statements :: Statements -> T_Statements
sem_Statements list = Prelude.foldr sem_Statements_Cons sem_Statements_Nil (Prelude.map sem_Statement list)
newtype T_Statements = T_Statements {
attach_T_Statements :: Identity (T_Statements_s158 )
}
newtype T_Statements_s158 = C_Statements_s158 {
inv_Statements_s158 :: (T_Statements_v157 )
}
data T_Statements_s159 = C_Statements_s159
type T_Statements_v157 = (T_Statements_vIn157 ) -> (T_Statements_vOut157 )
data T_Statements_vIn157 = T_Statements_vIn157 ([((Expression, [String]), Core_TypingStrategy)]) (M.Map NameWithRange TpScheme) (Assumptions) (Predicates) (Int) (ClassEnvironment) (TypeErrors) (Warnings) (ConstraintSet) (Int) (Int) (DictionaryEnvironment) (Maybe Tp) (ImportEnvironment) (IO ()) (Monos) (Names) (OrderedTypeSynonyms) (InfoTree) ([Warning]) (FixpointSubstitution) (M.Map Int (Scheme Predicates)) (Names) (Int) (Int)
data T_Statements_vOut157 = T_Statements_vOut157 (Assumptions) (Int) (TypeErrors) ([(Name, Instance)]) (Warnings) (ConstraintSet) (Int) (DictionaryEnvironment) (Maybe Tp) (InfoTrees) (IO ()) (Names) ([Warning]) (Statements) (Names) (Int) (Int)
sem_Statements_Cons :: T_Statement -> T_Statements -> T_Statements
sem_Statements_Cons arg_hd_ arg_tl_ = T_Statements (return st158) where
st158 = let
v157 :: T_Statements_v157
v157 = \ (T_Statements_vIn157 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIgeneratorBeta _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_hdX155 = Control.Monad.Identity.runIdentity (attach_T_Statement (arg_hd_))
_tlX158 = Control.Monad.Identity.runIdentity (attach_T_Statements (arg_tl_))
(T_Statement_vOut154 _hdIassumptions _hdIbetaUnique _hdIcollectErrors _hdIcollectInstances _hdIcollectWarnings _hdIconstraints _hdIcounter _hdIdictionaryEnvironment _hdIgeneratorBeta _hdIinfoTree _hdImatchIO _hdImonos _hdInamesInScope _hdIpatternMatchWarnings _hdIself _hdIunboundNames _hdIuniqueChunk _hdIuniqueSecondRound) = inv_Statement_s155 _hdX155 (T_Statement_vIn154 _hdOallPatterns _hdOallTypeSchemes _hdOassumptions _hdOavailablePredicates _hdObetaUnique _hdOclassEnvironment _hdOcollectErrors _hdOcollectWarnings _hdOconstraints _hdOcounter _hdOcurrentChunk _hdOdictionaryEnvironment _hdOgeneratorBeta _hdOimportEnvironment _hdOmatchIO _hdOmonos _hdOnamesInScope _hdOorderedTypeSynonyms _hdOparentTree _hdOpatternMatchWarnings _hdOsubstitution _hdOtypeschemeMap _hdOunboundNames _hdOuniqueChunk _hdOuniqueSecondRound)
(T_Statements_vOut157 _tlIassumptions _tlIbetaUnique _tlIcollectErrors _tlIcollectInstances _tlIcollectWarnings _tlIconstraints _tlIcounter _tlIdictionaryEnvironment _tlIgeneratorBeta _tlIinfoTrees _tlImatchIO _tlInamesInScope _tlIpatternMatchWarnings _tlIself _tlIunboundNames _tlIuniqueChunk _tlIuniqueSecondRound) = inv_Statements_s158 _tlX158 (T_Statements_vIn157 _tlOallPatterns _tlOallTypeSchemes _tlOassumptions _tlOavailablePredicates _tlObetaUnique _tlOclassEnvironment _tlOcollectErrors _tlOcollectWarnings _tlOconstraints _tlOcounter _tlOcurrentChunk _tlOdictionaryEnvironment _tlOgeneratorBeta _tlOimportEnvironment _tlOmatchIO _tlOmonos _tlOnamesInScope _tlOorderedTypeSynonyms _tlOparentTree _tlOpatternMatchWarnings _tlOsubstitution _tlOtypeschemeMap _tlOunboundNames _tlOuniqueChunk _tlOuniqueSecondRound)
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3744 _hdIassumptions
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3745 _hdIconstraints
_hdOassumptions = rule3746 _tlIassumptions
_hdOconstraints = rule3747 _tlIconstraints
_tlOassumptions = rule3748 _lhsIassumptions
_tlOconstraints = rule3749 _lhsIconstraints
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule3750 _hdIinfoTree _tlIinfoTrees
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3751 _hdIunboundNames
_tlOunboundNames = rule3752 _lhsIunboundNames
_hdOunboundNames = rule3753 _tlIunboundNames
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3754 _hdIcollectInstances _tlIcollectInstances
_self = rule3755 _hdIself _tlIself
_lhsOself :: Statements
_lhsOself = rule3756 _self
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3757 _tlIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3758 _tlIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3759 _tlIcollectWarnings
_lhsOcounter :: Int
_lhsOcounter = rule3760 _tlIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3761 _tlIdictionaryEnvironment
_lhsOgeneratorBeta :: Maybe Tp
_lhsOgeneratorBeta = rule3762 _tlIgeneratorBeta
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3763 _tlImatchIO
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3764 _tlInamesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3765 _tlIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3766 _tlIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3767 _tlIuniqueSecondRound
_hdOallPatterns = rule3768 _lhsIallPatterns
_hdOallTypeSchemes = rule3769 _lhsIallTypeSchemes
_hdOavailablePredicates = rule3770 _lhsIavailablePredicates
_hdObetaUnique = rule3771 _lhsIbetaUnique
_hdOclassEnvironment = rule3772 _lhsIclassEnvironment
_hdOcollectErrors = rule3773 _lhsIcollectErrors
_hdOcollectWarnings = rule3774 _lhsIcollectWarnings
_hdOcounter = rule3775 _lhsIcounter
_hdOcurrentChunk = rule3776 _lhsIcurrentChunk
_hdOdictionaryEnvironment = rule3777 _lhsIdictionaryEnvironment
_hdOgeneratorBeta = rule3778 _lhsIgeneratorBeta
_hdOimportEnvironment = rule3779 _lhsIimportEnvironment
_hdOmatchIO = rule3780 _lhsImatchIO
_hdOmonos = rule3781 _lhsImonos
_hdOnamesInScope = rule3782 _lhsInamesInScope
_hdOorderedTypeSynonyms = rule3783 _lhsIorderedTypeSynonyms
_hdOparentTree = rule3784 _lhsIparentTree
_hdOpatternMatchWarnings = rule3785 _lhsIpatternMatchWarnings
_hdOsubstitution = rule3786 _lhsIsubstitution
_hdOtypeschemeMap = rule3787 _lhsItypeschemeMap
_hdOuniqueChunk = rule3788 _lhsIuniqueChunk
_hdOuniqueSecondRound = rule3789 _lhsIuniqueSecondRound
_tlOallPatterns = rule3790 _lhsIallPatterns
_tlOallTypeSchemes = rule3791 _lhsIallTypeSchemes
_tlOavailablePredicates = rule3792 _lhsIavailablePredicates
_tlObetaUnique = rule3793 _hdIbetaUnique
_tlOclassEnvironment = rule3794 _lhsIclassEnvironment
_tlOcollectErrors = rule3795 _hdIcollectErrors
_tlOcollectWarnings = rule3796 _hdIcollectWarnings
_tlOcounter = rule3797 _hdIcounter
_tlOcurrentChunk = rule3798 _lhsIcurrentChunk
_tlOdictionaryEnvironment = rule3799 _hdIdictionaryEnvironment
_tlOgeneratorBeta = rule3800 _hdIgeneratorBeta
_tlOimportEnvironment = rule3801 _lhsIimportEnvironment
_tlOmatchIO = rule3802 _hdImatchIO
_tlOmonos = rule3803 _hdImonos
_tlOnamesInScope = rule3804 _hdInamesInScope
_tlOorderedTypeSynonyms = rule3805 _lhsIorderedTypeSynonyms
_tlOparentTree = rule3806 _lhsIparentTree
_tlOpatternMatchWarnings = rule3807 _hdIpatternMatchWarnings
_tlOsubstitution = rule3808 _lhsIsubstitution
_tlOtypeschemeMap = rule3809 _lhsItypeschemeMap
_tlOuniqueChunk = rule3810 _hdIuniqueChunk
_tlOuniqueSecondRound = rule3811 _hdIuniqueSecondRound
__result_ = T_Statements_vOut157 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOgeneratorBeta _lhsOinfoTrees _lhsOmatchIO _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Statements_s158 v157
rule3744 = \ ((_hdIassumptions) :: Assumptions) ->
_hdIassumptions
rule3745 = \ ((_hdIconstraints) :: ConstraintSet) ->
_hdIconstraints
rule3746 = \ ((_tlIassumptions) :: Assumptions) ->
_tlIassumptions
rule3747 = \ ((_tlIconstraints) :: ConstraintSet) ->
_tlIconstraints
rule3748 = \ ((_lhsIassumptions) :: Assumptions) ->
_lhsIassumptions
rule3749 = \ ((_lhsIconstraints) :: ConstraintSet) ->
_lhsIconstraints
rule3750 = \ ((_hdIinfoTree) :: InfoTree) ((_tlIinfoTrees) :: InfoTrees) ->
_hdIinfoTree : _tlIinfoTrees
rule3751 = \ ((_hdIunboundNames) :: Names) ->
_hdIunboundNames
rule3752 = \ ((_lhsIunboundNames) :: Names) ->
_lhsIunboundNames
rule3753 = \ ((_tlIunboundNames) :: Names) ->
_tlIunboundNames
rule3754 = \ ((_hdIcollectInstances) :: [(Name, Instance)]) ((_tlIcollectInstances) :: [(Name, Instance)]) ->
_hdIcollectInstances ++ _tlIcollectInstances
rule3755 = \ ((_hdIself) :: Statement) ((_tlIself) :: Statements) ->
(:) _hdIself _tlIself
rule3756 = \ _self ->
_self
rule3757 = \ ((_tlIbetaUnique) :: Int) ->
_tlIbetaUnique
rule3758 = \ ((_tlIcollectErrors) :: TypeErrors) ->
_tlIcollectErrors
rule3759 = \ ((_tlIcollectWarnings) :: Warnings) ->
_tlIcollectWarnings
rule3760 = \ ((_tlIcounter) :: Int) ->
_tlIcounter
rule3761 = \ ((_tlIdictionaryEnvironment) :: DictionaryEnvironment) ->
_tlIdictionaryEnvironment
rule3762 = \ ((_tlIgeneratorBeta) :: Maybe Tp) ->
_tlIgeneratorBeta
rule3763 = \ ((_tlImatchIO) :: IO ()) ->
_tlImatchIO
rule3764 = \ ((_tlInamesInScope) :: Names) ->
_tlInamesInScope
rule3765 = \ ((_tlIpatternMatchWarnings) :: [Warning]) ->
_tlIpatternMatchWarnings
rule3766 = \ ((_tlIuniqueChunk) :: Int) ->
_tlIuniqueChunk
rule3767 = \ ((_tlIuniqueSecondRound) :: Int) ->
_tlIuniqueSecondRound
rule3768 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3769 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3770 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3771 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3772 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3773 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3774 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3775 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3776 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3777 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3778 = \ ((_lhsIgeneratorBeta) :: Maybe Tp) ->
_lhsIgeneratorBeta
rule3779 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3780 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3781 = \ ((_lhsImonos) :: Monos) ->
_lhsImonos
rule3782 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3783 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3784 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule3785 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3786 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3787 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3788 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3789 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
rule3790 = \ ((_lhsIallPatterns) :: [((Expression, [String]), Core_TypingStrategy)]) ->
_lhsIallPatterns
rule3791 = \ ((_lhsIallTypeSchemes) :: M.Map NameWithRange TpScheme) ->
_lhsIallTypeSchemes
rule3792 = \ ((_lhsIavailablePredicates) :: Predicates) ->
_lhsIavailablePredicates
rule3793 = \ ((_hdIbetaUnique) :: Int) ->
_hdIbetaUnique
rule3794 = \ ((_lhsIclassEnvironment) :: ClassEnvironment) ->
_lhsIclassEnvironment
rule3795 = \ ((_hdIcollectErrors) :: TypeErrors) ->
_hdIcollectErrors
rule3796 = \ ((_hdIcollectWarnings) :: Warnings) ->
_hdIcollectWarnings
rule3797 = \ ((_hdIcounter) :: Int) ->
_hdIcounter
rule3798 = \ ((_lhsIcurrentChunk) :: Int) ->
_lhsIcurrentChunk
rule3799 = \ ((_hdIdictionaryEnvironment) :: DictionaryEnvironment) ->
_hdIdictionaryEnvironment
rule3800 = \ ((_hdIgeneratorBeta) :: Maybe Tp) ->
_hdIgeneratorBeta
rule3801 = \ ((_lhsIimportEnvironment) :: ImportEnvironment) ->
_lhsIimportEnvironment
rule3802 = \ ((_hdImatchIO) :: IO ()) ->
_hdImatchIO
rule3803 = \ ((_hdImonos) :: Monos) ->
_hdImonos
rule3804 = \ ((_hdInamesInScope) :: Names) ->
_hdInamesInScope
rule3805 = \ ((_lhsIorderedTypeSynonyms) :: OrderedTypeSynonyms) ->
_lhsIorderedTypeSynonyms
rule3806 = \ ((_lhsIparentTree) :: InfoTree) ->
_lhsIparentTree
rule3807 = \ ((_hdIpatternMatchWarnings) :: [Warning]) ->
_hdIpatternMatchWarnings
rule3808 = \ ((_lhsIsubstitution) :: FixpointSubstitution) ->
_lhsIsubstitution
rule3809 = \ ((_lhsItypeschemeMap) :: M.Map Int (Scheme Predicates)) ->
_lhsItypeschemeMap
rule3810 = \ ((_hdIuniqueChunk) :: Int) ->
_hdIuniqueChunk
rule3811 = \ ((_hdIuniqueSecondRound) :: Int) ->
_hdIuniqueSecondRound
sem_Statements_Nil :: T_Statements
sem_Statements_Nil = T_Statements (return st158) where
st158 = let
v157 :: T_Statements_v157
v157 = \ (T_Statements_vIn157 _lhsIallPatterns _lhsIallTypeSchemes _lhsIassumptions _lhsIavailablePredicates _lhsIbetaUnique _lhsIclassEnvironment _lhsIcollectErrors _lhsIcollectWarnings _lhsIconstraints _lhsIcounter _lhsIcurrentChunk _lhsIdictionaryEnvironment _lhsIgeneratorBeta _lhsIimportEnvironment _lhsImatchIO _lhsImonos _lhsInamesInScope _lhsIorderedTypeSynonyms _lhsIparentTree _lhsIpatternMatchWarnings _lhsIsubstitution _lhsItypeschemeMap _lhsIunboundNames _lhsIuniqueChunk _lhsIuniqueSecondRound) -> ( let
_lhsOinfoTrees :: InfoTrees
_lhsOinfoTrees = rule3812 ()
_lhsOunboundNames :: Names
_lhsOunboundNames = rule3813 _lhsIunboundNames
_lhsOcollectInstances :: [(Name, Instance)]
_lhsOcollectInstances = rule3814 ()
_self = rule3815 ()
_lhsOself :: Statements
_lhsOself = rule3816 _self
_lhsOassumptions :: Assumptions
_lhsOassumptions = rule3817 _lhsIassumptions
_lhsObetaUnique :: Int
_lhsObetaUnique = rule3818 _lhsIbetaUnique
_lhsOcollectErrors :: TypeErrors
_lhsOcollectErrors = rule3819 _lhsIcollectErrors
_lhsOcollectWarnings :: Warnings
_lhsOcollectWarnings = rule3820 _lhsIcollectWarnings
_lhsOconstraints :: ConstraintSet
_lhsOconstraints = rule3821 _lhsIconstraints
_lhsOcounter :: Int
_lhsOcounter = rule3822 _lhsIcounter
_lhsOdictionaryEnvironment :: DictionaryEnvironment
_lhsOdictionaryEnvironment = rule3823 _lhsIdictionaryEnvironment
_lhsOgeneratorBeta :: Maybe Tp
_lhsOgeneratorBeta = rule3824 _lhsIgeneratorBeta
_lhsOmatchIO :: IO ()
_lhsOmatchIO = rule3825 _lhsImatchIO
_lhsOnamesInScope :: Names
_lhsOnamesInScope = rule3826 _lhsInamesInScope
_lhsOpatternMatchWarnings :: [Warning]
_lhsOpatternMatchWarnings = rule3827 _lhsIpatternMatchWarnings
_lhsOuniqueChunk :: Int
_lhsOuniqueChunk = rule3828 _lhsIuniqueChunk
_lhsOuniqueSecondRound :: Int
_lhsOuniqueSecondRound = rule3829 _lhsIuniqueSecondRound
__result_ = T_Statements_vOut157 _lhsOassumptions _lhsObetaUnique _lhsOcollectErrors _lhsOcollectInstances _lhsOcollectWarnings _lhsOconstraints _lhsOcounter _lhsOdictionaryEnvironment _lhsOgeneratorBeta _lhsOinfoTrees _lhsOmatchIO _lhsOnamesInScope _lhsOpatternMatchWarnings _lhsOself _lhsOunboundNames _lhsOuniqueChunk _lhsOuniqueSecondRound
in __result_ )
in C_Statements_s158 v157
rule3812 = \ (_ :: ()) ->
[]
rule3813 = \ ((_lhsIunboundNames) :: Names) ->
_lhsIunboundNames
rule3814 = \ (_ :: ()) ->
[]
rule3815 = \ (_ :: ()) ->
[]
rule3816 = \ _self ->
_self
rule3817 = \ ((_lhsIassumptions) :: Assumptions) ->
_lhsIassumptions
rule3818 = \ ((_lhsIbetaUnique) :: Int) ->
_lhsIbetaUnique
rule3819 = \ ((_lhsIcollectErrors) :: TypeErrors) ->
_lhsIcollectErrors
rule3820 = \ ((_lhsIcollectWarnings) :: Warnings) ->
_lhsIcollectWarnings
rule3821 = \ ((_lhsIconstraints) :: ConstraintSet) ->
_lhsIconstraints
rule3822 = \ ((_lhsIcounter) :: Int) ->
_lhsIcounter
rule3823 = \ ((_lhsIdictionaryEnvironment) :: DictionaryEnvironment) ->
_lhsIdictionaryEnvironment
rule3824 = \ ((_lhsIgeneratorBeta) :: Maybe Tp) ->
_lhsIgeneratorBeta
rule3825 = \ ((_lhsImatchIO) :: IO ()) ->
_lhsImatchIO
rule3826 = \ ((_lhsInamesInScope) :: Names) ->
_lhsInamesInScope
rule3827 = \ ((_lhsIpatternMatchWarnings) :: [Warning]) ->
_lhsIpatternMatchWarnings
rule3828 = \ ((_lhsIuniqueChunk) :: Int) ->
_lhsIuniqueChunk
rule3829 = \ ((_lhsIuniqueSecondRound) :: Int) ->
_lhsIuniqueSecondRound
data Inh_Strings = Inh_Strings { }
data Syn_Strings = Syn_Strings { self_Syn_Strings :: (Strings) }
wrap_Strings :: T_Strings -> Inh_Strings -> (Syn_Strings )
wrap_Strings (T_Strings act) (Inh_Strings ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Strings_vIn160
(T_Strings_vOut160 _lhsOself) <- return (inv_Strings_s161 sem arg)
return (Syn_Strings _lhsOself)
)
sem_Strings :: Strings -> T_Strings
sem_Strings list = Prelude.foldr sem_Strings_Cons sem_Strings_Nil list
newtype T_Strings = T_Strings {
attach_T_Strings :: Identity (T_Strings_s161 )
}
newtype T_Strings_s161 = C_Strings_s161 {
inv_Strings_s161 :: (T_Strings_v160 )
}
data T_Strings_s162 = C_Strings_s162
type T_Strings_v160 = (T_Strings_vIn160 ) -> (T_Strings_vOut160 )
data T_Strings_vIn160 = T_Strings_vIn160
data T_Strings_vOut160 = T_Strings_vOut160 (Strings)
sem_Strings_Cons :: (String) -> T_Strings -> T_Strings
sem_Strings_Cons arg_hd_ arg_tl_ = T_Strings (return st161) where
st161 = let
v160 :: T_Strings_v160
v160 = \ (T_Strings_vIn160 ) -> ( let
_tlX161 = Control.Monad.Identity.runIdentity (attach_T_Strings (arg_tl_))
(T_Strings_vOut160 _tlIself) = inv_Strings_s161 _tlX161 (T_Strings_vIn160 )
_self = rule3830 _tlIself arg_hd_
_lhsOself :: Strings
_lhsOself = rule3831 _self
__result_ = T_Strings_vOut160 _lhsOself
in __result_ )
in C_Strings_s161 v160
rule3830 = \ ((_tlIself) :: Strings) hd_ ->
(:) hd_ _tlIself
rule3831 = \ _self ->
_self
sem_Strings_Nil :: T_Strings
sem_Strings_Nil = T_Strings (return st161) where
st161 = let
v160 :: T_Strings_v160
v160 = \ (T_Strings_vIn160 ) -> ( let
_self = rule3832 ()
_lhsOself :: Strings
_lhsOself = rule3833 _self
__result_ = T_Strings_vOut160 _lhsOself
in __result_ )
in C_Strings_s161 v160
rule3832 = \ (_ :: ()) ->
[]
rule3833 = \ _self ->
_self
data Inh_Type = Inh_Type { }
data Syn_Type = Syn_Type { self_Syn_Type :: (Type) }
wrap_Type :: T_Type -> Inh_Type -> (Syn_Type )
wrap_Type (T_Type act) (Inh_Type ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Type_vIn163
(T_Type_vOut163 _lhsOself) <- return (inv_Type_s164 sem arg)
return (Syn_Type _lhsOself)
)
sem_Type :: Type -> T_Type
sem_Type ( Type_Application range_ prefix_ function_ arguments_ ) = sem_Type_Application ( sem_Range range_ ) prefix_ ( sem_Type function_ ) ( sem_Types arguments_ )
sem_Type ( Type_Variable range_ name_ ) = sem_Type_Variable ( sem_Range range_ ) ( sem_Name name_ )
sem_Type ( Type_Constructor range_ name_ ) = sem_Type_Constructor ( sem_Range range_ ) ( sem_Name name_ )
sem_Type ( Type_Qualified range_ context_ type_ ) = sem_Type_Qualified ( sem_Range range_ ) ( sem_ContextItems context_ ) ( sem_Type type_ )
sem_Type ( Type_Forall range_ typevariables_ type_ ) = sem_Type_Forall ( sem_Range range_ ) ( sem_Names typevariables_ ) ( sem_Type type_ )
sem_Type ( Type_Exists range_ typevariables_ type_ ) = sem_Type_Exists ( sem_Range range_ ) ( sem_Names typevariables_ ) ( sem_Type type_ )
sem_Type ( Type_Parenthesized range_ type_ ) = sem_Type_Parenthesized ( sem_Range range_ ) ( sem_Type type_ )
newtype T_Type = T_Type {
attach_T_Type :: Identity (T_Type_s164 )
}
newtype T_Type_s164 = C_Type_s164 {
inv_Type_s164 :: (T_Type_v163 )
}
data T_Type_s165 = C_Type_s165
type T_Type_v163 = (T_Type_vIn163 ) -> (T_Type_vOut163 )
data T_Type_vIn163 = T_Type_vIn163
data T_Type_vOut163 = T_Type_vOut163 (Type)
sem_Type_Application :: T_Range -> (Bool) -> T_Type -> T_Types -> T_Type
sem_Type_Application arg_range_ arg_prefix_ arg_function_ arg_arguments_ = T_Type (return st164) where
st164 = let
v163 :: T_Type_v163
v163 = \ (T_Type_vIn163 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_functionX164 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_function_))
_argumentsX167 = Control.Monad.Identity.runIdentity (attach_T_Types (arg_arguments_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Type_vOut163 _functionIself) = inv_Type_s164 _functionX164 (T_Type_vIn163 )
(T_Types_vOut166 _argumentsIself) = inv_Types_s167 _argumentsX167 (T_Types_vIn166 )
_self = rule3834 _argumentsIself _functionIself _rangeIself arg_prefix_
_lhsOself :: Type
_lhsOself = rule3835 _self
__result_ = T_Type_vOut163 _lhsOself
in __result_ )
in C_Type_s164 v163
rule3834 = \ ((_argumentsIself) :: Types) ((_functionIself) :: Type) ((_rangeIself) :: Range) prefix_ ->
Type_Application _rangeIself prefix_ _functionIself _argumentsIself
rule3835 = \ _self ->
_self
sem_Type_Variable :: T_Range -> T_Name -> T_Type
sem_Type_Variable arg_range_ arg_name_ = T_Type (return st164) where
st164 = let
v163 :: T_Type_v163
v163 = \ (T_Type_vIn163 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_self = rule3836 _nameIself _rangeIself
_lhsOself :: Type
_lhsOself = rule3837 _self
__result_ = T_Type_vOut163 _lhsOself
in __result_ )
in C_Type_s164 v163
rule3836 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Type_Variable _rangeIself _nameIself
rule3837 = \ _self ->
_self
sem_Type_Constructor :: T_Range -> T_Name -> T_Type
sem_Type_Constructor arg_range_ arg_name_ = T_Type (return st164) where
st164 = let
v163 :: T_Type_v163
v163 = \ (T_Type_vIn163 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_nameX113 = Control.Monad.Identity.runIdentity (attach_T_Name (arg_name_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Name_vOut112 _nameIself) = inv_Name_s113 _nameX113 (T_Name_vIn112 )
_self = rule3838 _nameIself _rangeIself
_lhsOself :: Type
_lhsOself = rule3839 _self
__result_ = T_Type_vOut163 _lhsOself
in __result_ )
in C_Type_s164 v163
rule3838 = \ ((_nameIself) :: Name) ((_rangeIself) :: Range) ->
Type_Constructor _rangeIself _nameIself
rule3839 = \ _self ->
_self
sem_Type_Qualified :: T_Range -> T_ContextItems -> T_Type -> T_Type
sem_Type_Qualified arg_range_ arg_context_ arg_type_ = T_Type (return st164) where
st164 = let
v163 :: T_Type_v163
v163 = \ (T_Type_vIn163 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_contextX26 = Control.Monad.Identity.runIdentity (attach_T_ContextItems (arg_context_))
_typeX164 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_type_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_ContextItems_vOut25 _contextIself) = inv_ContextItems_s26 _contextX26 (T_ContextItems_vIn25 )
(T_Type_vOut163 _typeIself) = inv_Type_s164 _typeX164 (T_Type_vIn163 )
_self = rule3840 _contextIself _rangeIself _typeIself
_lhsOself :: Type
_lhsOself = rule3841 _self
__result_ = T_Type_vOut163 _lhsOself
in __result_ )
in C_Type_s164 v163
rule3840 = \ ((_contextIself) :: ContextItems) ((_rangeIself) :: Range) ((_typeIself) :: Type) ->
Type_Qualified _rangeIself _contextIself _typeIself
rule3841 = \ _self ->
_self
sem_Type_Forall :: T_Range -> T_Names -> T_Type -> T_Type
sem_Type_Forall arg_range_ arg_typevariables_ arg_type_ = T_Type (return st164) where
st164 = let
v163 :: T_Type_v163
v163 = \ (T_Type_vIn163 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_typevariablesX116 = Control.Monad.Identity.runIdentity (attach_T_Names (arg_typevariables_))
_typeX164 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_type_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Names_vOut115 _typevariablesIself) = inv_Names_s116 _typevariablesX116 (T_Names_vIn115 )
(T_Type_vOut163 _typeIself) = inv_Type_s164 _typeX164 (T_Type_vIn163 )
_self = rule3842 _rangeIself _typeIself _typevariablesIself
_lhsOself :: Type
_lhsOself = rule3843 _self
__result_ = T_Type_vOut163 _lhsOself
in __result_ )
in C_Type_s164 v163
rule3842 = \ ((_rangeIself) :: Range) ((_typeIself) :: Type) ((_typevariablesIself) :: Names) ->
Type_Forall _rangeIself _typevariablesIself _typeIself
rule3843 = \ _self ->
_self
sem_Type_Exists :: T_Range -> T_Names -> T_Type -> T_Type
sem_Type_Exists arg_range_ arg_typevariables_ arg_type_ = T_Type (return st164) where
st164 = let
v163 :: T_Type_v163
v163 = \ (T_Type_vIn163 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_typevariablesX116 = Control.Monad.Identity.runIdentity (attach_T_Names (arg_typevariables_))
_typeX164 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_type_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Names_vOut115 _typevariablesIself) = inv_Names_s116 _typevariablesX116 (T_Names_vIn115 )
(T_Type_vOut163 _typeIself) = inv_Type_s164 _typeX164 (T_Type_vIn163 )
_self = rule3844 _rangeIself _typeIself _typevariablesIself
_lhsOself :: Type
_lhsOself = rule3845 _self
__result_ = T_Type_vOut163 _lhsOself
in __result_ )
in C_Type_s164 v163
rule3844 = \ ((_rangeIself) :: Range) ((_typeIself) :: Type) ((_typevariablesIself) :: Names) ->
Type_Exists _rangeIself _typevariablesIself _typeIself
rule3845 = \ _self ->
_self
sem_Type_Parenthesized :: T_Range -> T_Type -> T_Type
sem_Type_Parenthesized arg_range_ arg_type_ = T_Type (return st164) where
st164 = let
v163 :: T_Type_v163
v163 = \ (T_Type_vIn163 ) -> ( let
_rangeX134 = Control.Monad.Identity.runIdentity (attach_T_Range (arg_range_))
_typeX164 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_type_))
(T_Range_vOut133 _rangeIself) = inv_Range_s134 _rangeX134 (T_Range_vIn133 )
(T_Type_vOut163 _typeIself) = inv_Type_s164 _typeX164 (T_Type_vIn163 )
_self = rule3846 _rangeIself _typeIself
_lhsOself :: Type
_lhsOself = rule3847 _self
__result_ = T_Type_vOut163 _lhsOself
in __result_ )
in C_Type_s164 v163
rule3846 = \ ((_rangeIself) :: Range) ((_typeIself) :: Type) ->
Type_Parenthesized _rangeIself _typeIself
rule3847 = \ _self ->
_self
data Inh_Types = Inh_Types { }
data Syn_Types = Syn_Types { self_Syn_Types :: (Types) }
wrap_Types :: T_Types -> Inh_Types -> (Syn_Types )
wrap_Types (T_Types act) (Inh_Types ) =
Control.Monad.Identity.runIdentity (
do sem <- act
let arg = T_Types_vIn166
(T_Types_vOut166 _lhsOself) <- return (inv_Types_s167 sem arg)
return (Syn_Types _lhsOself)
)
sem_Types :: Types -> T_Types
sem_Types list = Prelude.foldr sem_Types_Cons sem_Types_Nil (Prelude.map sem_Type list)
newtype T_Types = T_Types {
attach_T_Types :: Identity (T_Types_s167 )
}
newtype T_Types_s167 = C_Types_s167 {
inv_Types_s167 :: (T_Types_v166 )
}
data T_Types_s168 = C_Types_s168
type T_Types_v166 = (T_Types_vIn166 ) -> (T_Types_vOut166 )
data T_Types_vIn166 = T_Types_vIn166
data T_Types_vOut166 = T_Types_vOut166 (Types)
sem_Types_Cons :: T_Type -> T_Types -> T_Types
sem_Types_Cons arg_hd_ arg_tl_ = T_Types (return st167) where
st167 = let
v166 :: T_Types_v166
v166 = \ (T_Types_vIn166 ) -> ( let
_hdX164 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_hd_))
_tlX167 = Control.Monad.Identity.runIdentity (attach_T_Types (arg_tl_))
(T_Type_vOut163 _hdIself) = inv_Type_s164 _hdX164 (T_Type_vIn163 )
(T_Types_vOut166 _tlIself) = inv_Types_s167 _tlX167 (T_Types_vIn166 )
_self = rule3848 _hdIself _tlIself
_lhsOself :: Types
_lhsOself = rule3849 _self
__result_ = T_Types_vOut166 _lhsOself
in __result_ )
in C_Types_s167 v166
rule3848 = \ ((_hdIself) :: Type) ((_tlIself) :: Types) ->
(:) _hdIself _tlIself
rule3849 = \ _self ->
_self
sem_Types_Nil :: T_Types
sem_Types_Nil = T_Types (return st167) where
st167 = let
v166 :: T_Types_v166
v166 = \ (T_Types_vIn166 ) -> ( let
_self = rule3850 ()
_lhsOself :: Types
_lhsOself = rule3851 _self
__result_ = T_Types_vOut166 _lhsOself
in __result_ )
in C_Types_s167 v166
rule3850 = \ (_ :: ()) ->
[]
rule3851 = \ _self ->
_self