hask icon indicating copy to clipboard operation
hask copied to clipboard

Python 3 Install

Open xnmp opened this issue 6 years ago • 12 comments

I can install hask with Python 2 with no issues, but in Python 3 I get the error:

Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    import hask
  File "/home/user/Downloads/hask/hask/__init__.py", line 9, in <module>
    import Data.Char
ModuleNotFoundError: No module named 'Data'

This is presumably because relative imports are gone in Python 3. Is there any way to get it working regardless? I'm really keen to use this.

xnmp avatar Jul 08 '17 19:07 xnmp

@xnmp This project seems pretty dead. I emailed the author, but he hasn't responded for a year.

ghost avatar Jul 11 '17 04:07 ghost

Coconut (https://github.com/evhub/coconut) seems to be a usable alternative.

pya avatar Jul 12 '17 06:07 pya

I can confirm that coconut is excellent. Well documented, usable and source compatible with Python 3.

iamrecursion avatar Jul 12 '17 18:07 iamrecursion

Yes, I worked my way through the tutorial. Feels like a working cross-over between Python and Haskell.

pya avatar Jul 13 '17 05:07 pya

@xnmp @pya @iamrecursion Hey, it's been a pretty long time. I wanted to see if anyone's interested in joining me to create a Python 3 fix for hask. Coconut is usable, but it doesn't have the same level of tooling support and maturity as Python. Additionally, hask is far more functionally oriented, whereas Coconut simply happens to add functional syntax. Coconut doesn't have typeclasses, Haskell types, or decent type checking in a Hindley-Miller rather than default Python way.

I think it would be a very fun and useful endeavor.

ghost avatar Nov 14 '17 04:11 ghost

https://github.com/forked-from-1kasper/hask I tried to port hask to Python 3. It works. All tests pass, but not all of the code is covered by them. We need to work even more, yes. (no, this is not advertising)

forked-from-1kasper avatar Nov 16 '17 08:11 forked-from-1kasper

I have tried to communicate with the original author, but I've gotten no response. I've recently published this on PyPI which supports Python 3 (up to whatever tests do test): https://pypi.org/project/hask3

I'm not probably taking over the project with the same goal of the original (that's why I changed the name to hask3), but I'm probably going to use some of it's features.

mvaled avatar Jul 18 '18 14:07 mvaled

@forked-from-1kasper and @mvaled , what is the status of your forks? I may be interested in contributing.

james1293 avatar Aug 22 '18 01:08 james1293

@james1293, if you want to contribute to my fork, then do it.

forked-from-1kasper avatar Aug 22 '18 04:08 forked-from-1kasper

My fork is https://github.com/mvaled/hask.

But currently @med-merchise is doing most of the changes in https://gitlab.merchise.org/merchise/hask which I regularly push back to github.

When we starting exploring hask, we kept Python 2.7 support, but recently we decided to work only in Python 3.6+. To make this decision less intrusive we also changed the package name to 'hask3' and made some initial releases in the PyPi: http://pypi.org/project/hask3

We may use hask3 in our project https://gitlab.merchise.org/merchise/xopgi.ql, which (will) implement an expression language. hask3 may provide the concrete values in the language. So far, we have done the basic typechecker.

mvaled avatar Aug 22 '18 18:08 mvaled

Super cool. Is there active work going on, or a to do list? I'd be happy to contribute.

dmlerner avatar Dec 02 '19 20:12 dmlerner

@dmlerner I stopped doing any more changes on hask3.

mvaled avatar Dec 08 '19 18:12 mvaled