mirror of
https://github.com/chrisdone/duet.git
synced 2025-01-05 03:54:48 +03:00
Stackify; builds on LTS-8.9 (GHC 8.0.2)
This commit is contained in:
parent
e2833a16de
commit
4c15c6b27b
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.stack-work
|
@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE NoMonomorphismRestriction #-}
|
||||
-----------------------------------------------------------------------------
|
||||
-- TIMain: Type Inference Algorithm
|
||||
--
|
||||
|
@ -13,6 +13,7 @@
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module TIMonad where
|
||||
import Control.Monad
|
||||
import Id
|
||||
import Kind
|
||||
import Type
|
||||
@ -23,6 +24,8 @@ import Scheme
|
||||
|
||||
newtype TI a = TI (Subst -> Int -> (Subst, Int, a))
|
||||
|
||||
instance Functor TI where fmap = liftM
|
||||
instance Applicative TI where (<*>) = ap; pure = return
|
||||
instance Monad TI where
|
||||
return x = TI (\s n -> (s,n,x))
|
||||
TI f >>= g = TI (\s n -> case f s n of
|
||||
|
1
stack.yaml
Normal file
1
stack.yaml
Normal file
@ -0,0 +1 @@
|
||||
resolver: lts-8.9
|
Loading…
Reference in New Issue
Block a user