Skip to content

Issues getting code from OpenSums to compile #18

@JonathanLorimer

Description

@JonathanLorimer

Relevent pages 138-141

import Fcf is not found, and if you get rid of that you are hit with other errors when you implement

type FindElem (key :: k) (ts :: [k])
   = FromMaybe Stuck =<< FindIndex (TyEq key) ts

there are three errors:

 error:
    Not in scope: type constructor or class ‘Stuck’
   |
33 |    = FromMaybe Stuck =<< FindIndex (TyEq key) ts
   |                ^^^^^
/Users/jonathan.l/Documents/thinking-with-types/src/CH11.hs:33:22-24: error:
    Not in scope: type constructor or class ‘=<<’
   |
33 |    = FromMaybe Stuck =<< FindIndex (TyEq key) ts
   |                      ^^^
/Users/jonathan.l/Documents/thinking-with-types/src/CH11.hs:33:26-34: error:
    Not in scope: type constructor or class ‘FindIndex’
   |
33 |    = FromMaybe Stuck =<< FindIndex (TyEq key) ts
   |                          ^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions