Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
11
Issues
11
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-platform
Commits
dfbb24e2
Verified
Commit
dfbb24e2
authored
Dec 04, 2018
by
Camil Staps
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove itask compiler dependency in Clean.Types.CoclTransform
parent
b38dec2d
Pipeline
#16908
passed with stage
in 2 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
CoclTransform.icl
src/libraries/OS-Independent/Clean/Types/CoclTransform.icl
+5
-5
No files found.
src/libraries/OS-Independent/Clean/Types/CoclTransform.icl
View file @
dfbb24e2
...
...
@@ -12,7 +12,7 @@ import Control.Monad.State
import Data.Functor
from Data.Maybe import :: Maybe (..), instance Functor Maybe,
instance pure Maybe, instance <*> Maybe, instance Monad Maybe
import qualified Data.Map
as M
import qualified Data.Map
import syntax
import qualified syntax
...
...
@@ -123,7 +123,7 @@ strictnessListToBools (StrictList i l) = strictnessListToBools (Strict i) ++ str
:: TypeDerivState =
{ tds_var_index :: Int
, tds_allows_new_idents :: Bool
, tds_map :: '
M
'.Map String 'Clean.Types'.Type
, tds_map :: '
Data.Map
'.Map String 'Clean.Types'.Type
}
tds_var_index tds = tds.tds_var_index
tds_allows_new_idents tds = tds.tds_allows_new_idents
...
...
@@ -132,7 +132,7 @@ tds_map tds = tds.tds_map
class coclType a :: !a -> StateT TypeDerivState Maybe 'Clean.Types'.Type
store :: !String !'Clean.Types'.Type -> StateT TypeDerivState Maybe 'Clean.Types'.Type
store id t = modify (\tds -> {tds & tds_map='
M
'.put id t tds.tds_map}) $> t
store id t = modify (\tds -> {tds & tds_map='
Data.Map
'.put id t tds.tds_map}) $> t
allowNewIdents :: !Bool -> StateT TypeDerivState Maybe ()
allowNewIdents b = modify \tds -> {tds & tds_allows_new_idents=b}
...
...
@@ -144,7 +144,7 @@ pdType :: !'syntax'.ParsedDefinition -> Maybe 'Clean.Types'.Type
pdType pd = evalStateT (coclType pd)
{ tds_var_index = 0
, tds_allows_new_idents = True
, tds_map = '
M
'.newMap
, tds_map = '
Data.Map
'.newMap
}
instance coclType 'syntax'.ParsedDefinition
...
...
@@ -161,7 +161,7 @@ where
instance coclType 'syntax'.ParsedExpr
where
coclType (PE_Basic b) = coclType b
coclType (PE_Ident id) = gets tds_map >>= \m -> case '
M
'.get id.id_name m of
coclType (PE_Ident id) = gets tds_map >>= \m -> case '
Data.Map
'.get id.id_name m of
Nothing -> gets tds_allows_new_idents >>= \allowed -> if allowed
(gets tds_var_index >>= \i ->
modify (\tds -> {tds & tds_var_index=i+1}) >>|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment