blob: 1ae2ebf92e1458b9312f9e57d32b8d7a0a9509b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RoleAnnotations #-}
unit number-unknown where
signature NumberUnknown where
import GHC.Types
import GHC.Exts
data Rep (l :: Levity) :: RuntimeRep
data Number (l :: Levity) :: TYPE (Rep l)
plus :: Number l -> Number l -> Number l
multiply :: Number l -> Number l -> Number l
module NumberStuff where
import NumberUnknown
funcA :: Number l -> Number l -> Number l
funcA x y = plus x (multiply x y)
-- should get a representation polymorphism error: 'Rep l' is not fixed.
|