[Haskell-cafe] type-level integers for GHC

34 views
Skip to first unread message

Takayuki Muranushi

unread,
May 17, 2013, 2:17:58 AM5/17/13
to haskell
What is your recommendation for type-level integers?

I'd like to use it to improve the unittyped,
https://bitbucket.org/xnyhps/haskell-unittyped/ the library for
physical dimension. Therefore, I need negative numbers, additions, but
multiplications are not necessary.

I've been looking forward for the type-nats extension of GHC, but I
haven't been able to compile the type-nats branch. Just learned that
it still takes a few month to merge the branch into the main.
http://hackage.haskell.org/trac/ghc/wiki/Status/May13

Thijs, the original author of unittyped, has commited a branch that
uses type-nats, but I can't try that out for the same reason.


Best,
--
Takayuki MURANUSHI
The Hakubi Center for Advanced Research, Kyoto University
http://www.hakubi.kyoto-u.ac.jp/02_mem/h22/muranushi.html

_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Simon Peyton-Jones

unread,
May 17, 2013, 3:50:30 AM5/17/13
to Takayuki Muranushi, haskell
I wonder why you can't compile type-nats? It should just work. You could email ghc-devs and Iavor (type-nats author, cc'd) explaining exactly what goes wrong. You may need the type-nats branch of some libraries, I'm not sure

Simon

Microsoft Research Limited (company number 03369488) is registered in England and Wales
Registered office 21 Station Road, Cambridge, CB1 2FB

Takayuki Muranushi

unread,
May 18, 2013, 2:13:49 AM5/18/13
to Simon Peyton-Jones, haskell
Hey thanks Simon and Levor, I've reported the problem month ago, and I
see today the commit-id for type-nats is still not changed. So I
thought the problem remains. Let me first try the compile process
again tonight, and report the compile process in more detail.

2013/5/17 Simon Peyton-Jones <sim...@microsoft.com>:

Christiaan Baaij

unread,
May 20, 2013, 4:56:25 AM5/20/13
to Takayuki Muranushi, Simon Peyton-Jones, haskell
What works best for me is to actually merge the type-nats branch into a local checkout of master; as opposed to checking out the type-nats branch.
Though you will usually have to do some (minor) conflict resolution.

-- Christiaan

Simon Peyton-Jones

unread,
May 20, 2013, 6:34:45 AM5/20/13
to Christiaan Baaij, Takayuki Muranushi, haskell
The type-nats branch *should* simply work all by itself. (You may need to check out a corresponding branch on some other repos, though.)

Iavor would you care to comment?

Takayuki Muranushi

unread,
May 21, 2013, 12:54:34 AM5/21/13
to Simon Peyton-Jones, haskell
Thank you everyone!
Iavor have kindly fixed the branch and now I can build it.

2013/5/20 Simon Peyton-Jones <sim...@microsoft.com>:
Reply all
Reply to author
Forward
0 new messages