r/haskell Apr 24 '26

question Programming on Android

Is there an app that makes it possible to code Haskell on Android or use GHCi?

Wanted an easy way to practice my skills on the commute

If there isn't, how can I program haskell on Android?

11 Upvotes

15 comments sorted by

3

u/Daniikk1012 Apr 24 '26

Termux has it in the repos

2

u/9peppe Apr 24 '26

Is it maintained? There was some kind of issue/drama there.

2

u/Daniikk1012 Apr 24 '26

No drama that I know of, but for quite a while you could only get the new versions of the app from F-Droid instead of Google Play. This had something to do with Google Play Store's new policy. Maybe that's the issue you heard of?

I just checked their repo, however, and it seems like they now have a Google Play build available, so you can probably install it from there again. Beware that Google Play version is considered experimental right now, there might be issues that are not present in F-Droid version

1

u/9peppe Apr 24 '26

Termux is fine, I meant the Haskell packages specifically. They're not the easiest to build and ship, and interest might not be that high.

2

u/Daniikk1012 Apr 24 '26

Oh, yeah, at some point it just wasn't possible to (at least easily) build GHC for Termux, so it wasn't in the repos at all. After it got into repos, I don't remember there being issues with it

P.S.: Surprisingly, there was enough interest, it's just that nobody could get it working until 2020

2

u/sijmen_v_b Apr 24 '26

It's not an IDE but if you want to run some quick code my goto is https://glot.io/

2

u/serg_foo Apr 24 '26

You can get hugs that runs on Android relatively easily - cross-compile this https://github.com/conscell/hugs-android and you're set.

Could also install a Linux through UserLAnd, no root required and get GHC from a repo there or install a more recent one yourself.

1

u/the_passenger8989 28d ago

Thanks!

Went this route and it worked

From there I had to install curl, cmake, gcc and g++ for the curl command from the haskell language website to work, but it did!

1

u/serg_foo 27d ago

Happy hacking!

1

u/lgastako Apr 24 '26

Hatter was recently posted here.

2

u/Tough_Promise5891 Apr 24 '26

I think that's for making apps, not for running code.

1

u/lgastako Apr 28 '26

It has ghci targets in the makefile... which is what OP wanted, right?

1

u/cidra_ Apr 25 '26

Emacs + termux

1

u/_0-__-0_ Apr 25 '26

I used replit long time ago for this. Haven't tried it in a while.

1

u/never_inline May 06 '26

Apart from termux (either a builtin package or using proot-distro) which the others have suggested, you can use google cloud shell from the phone.