Skip to content

Instantly share code, notes, and snippets.

@joshcough
Created May 26, 2015 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshcough/a04fd86d448af69be4d1 to your computer and use it in GitHub Desktop.
Save joshcough/a04fd86d448af69be4d1 to your computer and use it in GitHub Desktop.
withCompiler :: Extension -> (forall i. Thrist (FromSExprShow :=> Compiler1) i X86 -> a) -> a
withCompiler ".L1" go = go (mapThrist Constrained l1Compiler)
executables/LC.hs:51:39:
No instance for (FromSExpr y) arising from a use of ‘Constrained’
Possible fix:
add (FromSExpr y) to the context of
a type expected by the context:
Compiler1 x y -> (:=>) FromSExprShow Compiler1 x y
or the type signature for
withCompiler :: Extension
-> (forall i. Thrist (FromSExprShow :=> Compiler1) i X86 -> a) -> a
In the first argument of ‘mapThrist’, namely ‘Constrained’
In the first argument of ‘go’, namely
‘(mapThrist Constrained l1Compiler)’
In the expression: go (mapThrist Constrained l1Compiler)
@S11001001
Copy link

You need both the class and one instance, both with empty bodies; you probably need to add a ghc extension to define the instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment