Skip to content

Commit

Permalink
Fix build warnings of recent commits.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdone committed Sep 2, 2012
1 parent 8a4f4fa commit d85c89b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Language/Fay.hs
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ initialPass_decl toplevel decl =
-- | Collect record definitions and store record name and field names.
-- A ConDecl will have fields named slot1..slotN
initialPass_dataDecl :: Bool -> Decl -> [QualConDecl] -> Compile ()
initialPass_dataDecl _ decl constructors =
initialPass_dataDecl _ _decl constructors =
forM_ constructors $ \(QualConDecl _ _ _ condecl) ->
case condecl of
ConDecl (UnQual -> name) types -> do
let fields = map (Ident . ("slot"++) . show . fst) . zip [1 :: Integer ..] $ types
addRecordState name fields
InfixConDecl t1 (UnQual -> name) t2 ->
InfixConDecl _t1 (UnQual -> name) _t2 ->
addRecordState name ["slot1", "slot2"]
RecDecl (UnQual -> name) fields' -> do
let fields = concatMap fst fields'
Expand Down Expand Up @@ -454,7 +454,7 @@ convertGADT d =

-- | Compile a data declaration.
compileDataDecl :: Bool -> Decl -> [QualConDecl] -> Compile [JsStmt]
compileDataDecl toplevel decl constructors =
compileDataDecl toplevel _decl constructors =
fmap concat $
forM constructors $ \(QualConDecl _ _ _ condecl) ->
case condecl of
Expand Down Expand Up @@ -860,6 +860,7 @@ compileStmt inner stmt =
(QVarOp (UnQual (Symbol ">>")))
inner))
LetStmt (BDecls binds) -> return (Just (Let (BDecls binds) inner))
LetStmt _ -> throwError LetUnsupported
RecStmt{} -> throwError RecursiveDoUnsupported

compileGenerator srcloc pat inner exp = do
Expand Down

0 comments on commit d85c89b

Please sign in to comment.