Question

I've copied the Aeson Template-Haskell module into a project of mine, and I'm trying to get it to compile. However, when I compile, I get the following error:

compiler/Elm/Haskelm/Json.hs:283:1:
parse error (possibly incorrect indentation or mismatched brackets)

That line uses the 'Name convention from Template-Haskell, so I think it's probably treating it as single-quotation marks instead of the Template-Haskell notation.

Why would it be doing this? At the beginning of my file, I have:

 {-# LANGUAGE CPP, FlexibleInstances, IncoherentInstances, NamedFieldPuns,
NoImplicitPrelude, OverlappingInstances, TemplateHaskell,
UndecidableInstances #-}

and in my Cabal file, I have

extensions: TemplateHaskell 
            MultiWayIf

but it's not treating the single quotes specially.

Note that, other than changing the Module name, the file I'm trying to compile is completely unchanged from the github one linked to.

Was it helpful?

Solution

That error message claims the problem is at column 1. That means that the previous line was probably the location of the real problem. Your followup in the comments indicates that the previous line was incomplete, and the line listed in the error message was supposed to be indented further to make it a continuation of the previous line.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top