Commit 228e6739 authored by Michael Hanus 's avatar Michael Hanus

Type synonym IArity used

parent 66c8cca1
......@@ -34,7 +34,7 @@ iFPCall n = IFPCall (siq n)
iCPCall :: String -> Int -> [IExpr] -> IExpr
iCPCall n = ICPCall (siq n)
iConsBranch :: String -> Int -> IBlock -> IConsBranch
iConsBranch :: String -> IArity -> IBlock -> IConsBranch
iConsBranch n = IConsBranch (siq n)
icurryList :: [IExpr] -> IExpr
......
......@@ -93,7 +93,7 @@ data ICOptions = ICOptions
, optShowGraph :: Bool -- visualize graph during execution?
, optViewPDF :: String -- command to view graph PDF
, optInteractive :: Bool -- interactive execution?
, optConsMap :: [(QName,(Int,Int))] -- map: constr names to arity/position
, optConsMap :: [(QName,(IArity,Int))] -- map: cons. names to arity/position
, optFunMap :: [(QName,Int)] -- map: function names to module indices
, optFun :: QName -- currently compiled function
}
......@@ -102,7 +102,7 @@ defaultICOptions :: ICOptions
defaultICOptions = ICOptions 1 False "" False "evince" False [] [] ("","")
-- Lookup arity and position index of a constructor.
arityPosOfCons :: ICOptions -> QName -> (Int,Int)
arityPosOfCons :: ICOptions -> QName -> (IArity,Int)
arityPosOfCons opts qn =
maybe (error "Internal error: posOfCons") id (lookup qn (optConsMap opts))
......
......@@ -110,7 +110,7 @@ data IStatement =
--- Only the constructor and its arity matching this branch is given.
--- The assignments of constructor arguments to pattern variables
--- must be done in the ICurry block.
data IConsBranch = IConsBranch IQName Int IBlock
data IConsBranch = IConsBranch IQName IArity IBlock
deriving (Show, Read)
--- An ICurry case branch over literals.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment