1module Elm.Compiler.Type.Extract where
3import Control.Arrow (second)
4import qualified AST.Type as Type
5import qualified AST.Variable as Var
6import qualified Elm.Compiler.Type as T
9-- INTERNAL TYPE to PUBLIC TYPE
11fromInternalType :: Type.Canonical -> T.Type
12fromInternalType astType =
15 T.Lambda (fromInternalType t1) (fromInternalType t2)
21 T.Type (Var.toString var)
24 T.App (fromInternalType t) (map fromInternalType ts)
26 Type.Record fields ext ->
27 T.Record (map (second fromInternalType) fields) (fmap fromInternalType ext)
29 Type.Aliased _name args t ->
30 fromInternalType (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