News for hackers. Stuff that matters.
Re:CIS 194: Introduction to Haskell (Spring 2013) by klibertp on Monday July 29, 2013 @08:53AM (#6120696)
Not in Haskell, but there are languages where it's possible. It's called dependent typing and I don't really understand how it works, but I suppose gp was referring to this.
Re:CIS 194: Introduction to Haskell (Spring 2013) by sold on Monday July 29, 2013 @10:40AM (#6121351)
It is possible in GHC, see parent comment.
Re:CIS 194: Introduction to Haskell (Spring 2013) by jdn on Monday July 29, 2013 @09:01AM (#6120750)
Oh of course, and that also explains the use of GADTs since they are one route to dependent types in Haskell. I'm not sure what he's done there is fully legit, but maybe not as loony as at first thought.
Re:CIS 194: Introduction to Haskell (Spring 2013) by tel on Monday July 29, 2013 @10:42AM (#6121364)
It plays fast and loose on notation, but is perfectly kosher in GHC (not Haskell2010 or Haskell98).