1module Elm.Compiler.Type.Extract (toFullType, toAliasedType) where
3import Control.Arrow (second)
4import qualified AST.Type as Type
5import qualified AST.Variable as Var
6import qualified Elm.Compiler.Type as T
9toFullType :: Type.Canonical -> T.Type
14toAliasedType :: Type.Canonical -> T.Type
15toAliasedType astType =
19toType :: Bool -> Type.Canonical -> T.Type
20toType useAliases astType =
22 go = toType useAliases
26 T.Lambda (go t1) (go t2)
32 T.Type (Var.toString var)
35 T.App (go t) (map go ts)
37 Type.Record fields ext ->
38 T.Record (map (second go) fields) (fmap go ext)
40 Type.Aliased name args t ->
42 T.App (T.Type (Var.toString name)) (map (go . snd) args)
44 go (Type.dealias args t)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list