Created
May 26, 2015 02:25
-
-
Save joshcough/003f7fb6fb832d6d14ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- compile from i all the way to o, writing any intermediate files | |
compileTurtles :: | |
Show o => | |
Thrist (Show :=> Compiler1) i o -> | |
CompilationOptions -> | |
FilePath -> --the original input file, also serves as the program name | |
i -> | |
IO () | |
compileTurtles n@(Nil _) opts inputFile input = | |
compileAndWriteResult (mapThrist (\(Constrained f) -> f) n) opts inputFile input >> return () | |
compileTurtles c@(Cons c1 t) opts inputFile input = do | |
code <- compileAndWriteResult _ opts inputFile input | |
either error (compileTurtles t opts inputFile) code | |
src/L/Compiler.hs:239:33: | |
Found hole ‘_’ with type: Compiler i j | |
Where: ‘i’ is a rigid type variable bound by | |
the type signature for | |
compileTurtles :: Show o => | |
Thrist (Show :=> Compiler1) i o | |
-> CompilationOptions -> FilePath -> i -> IO () | |
at src/L/Compiler.hs:230:3 | |
‘j’ is a rigid type variable bound by | |
a pattern with constructor | |
Cons :: forall (l :: * -> * -> *) i k j. | |
l i j -> Thrist l j k -> Thrist l i k, | |
in an equation for ‘compileTurtles’ | |
at src/L/Compiler.hs:238:19 | |
Relevant bindings include | |
input :: i (bound at src/L/Compiler.hs:238:45) | |
inputFile :: FilePath (bound at src/L/Compiler.hs:238:35) | |
opts :: CompilationOptions (bound at src/L/Compiler.hs:238:30) | |
t :: Thrist (Show :=> Compiler1) j o | |
(bound at src/L/Compiler.hs:238:27) | |
c1 :: (:=>) Show Compiler1 i j (bound at src/L/Compiler.hs:238:24) | |
c :: Thrist (Show :=> Compiler1) i o | |
(bound at src/L/Compiler.hs:238:16) | |
(Some bindings suppressed; use -fmax-relevant-binds=N or -fno-max-relevant-binds) | |
In the first argument of ‘compileAndWriteResult’, namely ‘_’ | |
In a stmt of a 'do' block: | |
code <- compileAndWriteResult _ opts inputFile input | |
In the expression: | |
do { code <- compileAndWriteResult _ opts inputFile input; | |
either error (compileTurtles t opts inputFile) code } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment