Gabriella439 / Haskell-Morte-Library

A bare-bones calculus-of-constructions
BSD 3-Clause "New" or "Revised" License
373 stars 25 forks source link

Morte fails on Windows (due to unicode output?) #58

Closed gergoerdi closed 7 years ago

gergoerdi commented 7 years ago

Morte 1.6.2 is DOA on Windows 7 both on Cygwin and the Windows cmd shell:

On Cygwin:

$ cat hello.mt
\(a : *) -> \(x : a) -> x

$ morte < hello.mt
morte.exe: <stderr>: hPutChar: invalid argument (invalid character)

In cmd.exe:

C:\Users\cactus\Documents\playground\morte>type hello.mt
\(a : *) -> \(x : a) -> x

C:\Users\cactus\Documents\playground\morte>d:\local\stack\Local\bin\morte < hello.mt
morte: <stderr>: hPutChar: invalid argument (invalid character)
gergoerdi commented 7 years ago

Is there a way to turn off Unicode output? I'd like to try that and see if that works (i.e. using \/ instead of etc.)?

gergoerdi commented 7 years ago

I've found a relevant Stackoverflow quesiton.

Gabriella439 commented 7 years ago

So if I could apply the fix described in the Stack Overflow question, would that be an acceptable solution for you or would you still prefer an option to disable Unicode output?

gergoerdi commented 7 years ago

I'd prefer to have both options. Also, I think I take back my original suggestion of using \/ in particular for ; I'd prefer forall instead.

Gabriella439 commented 7 years ago

Alright, this is fixed by these two commits:

The latter uses forall when rendering ASCII like you requested (and that's also my preference, too)