Skip to content

Desugaring/Typechecking bug #8

@Abhiroop

Description

@Abhiroop

Issue by Abhiroop
Thursday Apr 01, 2021 at 09:56 GMT
Originally opened as svenssonjoel/Sense-VM#8


This program fails:

data List a where
  Nil  : List a
  Cons : a -> List a -> List a


baz = let (Cons x _) = (Cons 1 Nil)
       in (x + x)

Fails with

let v7 = \ v5 -> \ v6 -> (Cons2 (v5, v6)) in let v8 = (Nil3) in let v0 = let (Cons2 (v1, _)*** Exception: Maybe.fromJust: Nothing
CallStack (from HasCallStack):
  error, called at libraries/base/Data/Maybe.hs:148:21 in base:Data.Maybe
  fromJust, called at /Users/abhiroopsarkar/C/Sense-VM/frontend/CamIoT/src/Desugaring/Desugar.hs:30:53 in main:Desugaring.Desugar

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions