Skip to content

Instantly share code, notes, and snippets.

@joshcough
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshcough/ad3d3a28af0e7814f242 to your computer and use it in GitHub Desktop.
Save joshcough/ad3d3a28af0e7814f242 to your computer and use it in GitHub Desktop.
129: freezeComputer :: Computer (STVector (World m) Int64) a -> Computer (Vector Int64) a
130: freezeComputer c = error "todo"
src/L/Computer.hs:129:19:
Couldn't match type ‘World m0’ with ‘World m’
NB: ‘World’ is a type function, and may not be injective
The type variable ‘m0’ is ambiguous
Expected type: Computer (STVector (World m) Int64) a
-> Computer (Vector Int64) a
Actual type: Computer (STVector (World m0) Int64) a
-> Computer (Vector Int64) a
In the ambiguity check for:
forall (m :: * -> *) a.
Computer (STVector (World m) Int64) a -> Computer (Vector Int64) a
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘freezeComputer’:
freezeComputer :: Computer (STVector (World m) Int64) a
-> Computer (Vector Int64) a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment