amuletml / amulet

An ML-like functional programming language
https://amulet.works/
BSD 3-Clause "New" or "Revised" License
326 stars 15 forks source link

ICE with Amc.type_error + stuck type functions #217

Closed plt-amy closed 4 years ago

plt-amy commented 4 years ago

First, declare a type function with no equations: (This isn't really necessary, but we do need a stuck type expression here)

type function foo 'a : Amc.error_message begin
end

Next, try to reduce type_error (foo _):

> Typeable.( Refl : Amc.type_error (foo int) :~: int )
amc: foo intKind error in solveTypeError
CallStack (from HasCallStack):
  error, called at src/Types/Unify/Magic.hs:132:19 in amuletml-0.6.0.0-FpV3lZItaEn5