[GHC] #15600: Bug while writing a simple parser with Parsec
GHC
ghc-devs at haskell.org
Mon Sep 3 23:23:32 UTC 2018
#15600: Bug while writing a simple parser with Parsec
-------------------------------------+-------------------------------------
Reporter: roehst | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.0.2
Keywords: | Operating System: Unknown/Multiple
Architecture: x86_64 | Type of failure: None/Unknown
(amd64) |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{#!hs
module Main where
import Control.Monad.Identity
import Control.Monad.State
import Data.List
import Text.ParserCombinators.Parsec
type Name = String
data Value = VlInt Int | VlBool Bool deriving Show
data Term =
TmVal Value
| TmVar Name
| TmLet Name Term Term
| TmAdd Term Term
deriving Show
parseTerm :: Parser Term
parseTerm = parseVal <|> parseVar <|> parseLet <|> parseAdd
}}}
And then I get:
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( Main.hs, interpreted )
ghc: panic! (the 'impossible' happened)
(GHC version 8.0.2 for x86_64-unknown-linux):
initTc: unsolved constraints
WC {wc_insol =
[W] parseVal_a2YR :: t_a2YQ[tau:1] (CHoleCan: parseVal)
[W] parseVar_a2YY :: t_a2YX[tau:1] (CHoleCan: parseVar)
[W] parseLet_a2Z5 :: t_a2Z4[tau:1] (CHoleCan: parseLet)
[W] parseAdd_a2Z8 :: t_a2Z7[tau:1] (CHoleCan: parseAdd)}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15600>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list