1. Thijs Alkemade
  2. haskell-unittyped

Commits

Takayuki Muranushi  committed 21349dc

add comments on Dimension and Unit.

  • Participants
  • Parent commits 173e685
  • Branches default

Comments (0)

Files changed (1)

File src/UnitTyped.hs

View file
         {-# INLINE fromNumber #-}
         fromNumber _ = -1 + (fromNumber (undefined :: NumberProxy (Neg a)))
 
+-- | Convert dimension to value-level information
 class Dimension a where
     dimension :: Value a b f -> M.Map TypeRep Integer
 
     dimension :: forall (b :: [(*, Number)]) f . Value ('(dim, value) ': rest) b f -> M.Map TypeRep Integer
     dimension _ = M.insert (typeOf (error "typeOf" :: dim)) (fromNumber (error "fromNumber" :: NumberProxy value)) (dimension (undefined :: Value rest b f))
 
+-- | Convert unit to value-level information
 class Unit b where
     unit :: Value a b f -> M.Map TypeRep Integer