haskell / haskell/haskell-mode

Parse error with type instances

Open
#1,638 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

```
{-# LANGUAGE DataKinds              #-}
{-# LANGUAGE KindSignatures         #-}
{-# LANGUAGE PolyKinds              #-}
{-# LANGUAGE TypeFamilies           #-}
{-# LANGUAGE TypeOperators          #-}
{-# LANGUAGE UndecidableInstances   #-}

module TypeLevelDefunctionalization where

import Data.Kind (Constraint, Type)
import qualified GHC.TypeLits as TL
...
data AddNat :: TL.Nat -> TL.Nat -> Exp TL.Nat
type instance Eval' (AddNat a a') = a TL.+ a'
```
Parse error
Found:
data AddNat :: TL.Nat -> TL.Nat -> Exp TL.Nat
> type instance Eval' (AddNat a a') = a TL.+ a'

Contributor guide

Open the contributing guide

Research direction

Start with the supplied TypeLevelDefunctionalization reproducer and inspect how the Haskell parser handles the data declaration followed by the type instance. Done means this input no longer produces the reported parse error; no specific source file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs, emacs-lisp, haskell
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.