3 ms·
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 refer
by klibertp 13y ago
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.
- jdn 13y agoOh 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.
- tel 13y agoIt plays fast and loose on notation, but is perfectly kosher in GHC (not Haskell2010 or Haskell98).
- sold 13y agoIt is possible in GHC, see parent comment.