5abstract data IO a = prim__IO a
8io_bind : IO a -> (a -> IO b) -> IO b
9io_bind (prim__IO v) k = k v
11unsafePerformIO : IO a -> a
12-- compiled as primitive
16io_return x = prim__IO x
18-- This may seem pointless, but we can use it to force an
19-- evaluation of main that Epic wouldn't otherwise do...
21run__IO : IO () -> IO ()
22run__IO v = io_bind v (\v' => io_return v')
24data FTy = FInt | FFloat | FChar | FString | FPtr | FAny Type | FUnit
26interpFTy : FTy -> Type
28interpFTy FFloat = Float
30interpFTy FString = String
35ForeignTy : (xs:List FTy) -> (t:FTy) -> Type
36ForeignTy xs t = mkForeign' (reverse xs) (IO (interpFTy t)) where
37 mkForeign' : List FTy -> Type -> Type
38 mkForeign' Nil ty = ty
39 mkForeign' (s :: ss) ty = mkForeign' ss (interpFTy s -> ty)
42data Foreign : Type -> Type where
43 FFun : String -> (xs:List FTy) -> (t:FTy) ->
44 Foreign (ForeignTy xs t)
46mkForeign : Foreign x -> x
47mkLazyForeign : Foreign x -> x
48-- mkForeign and mkLazyForeign compiled as primitives
50fork : |(thread:IO ()) -> IO Ptr
51fork x = io_return prim__vm -- compiled specially
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