Module for handling ICurry and related files
Author: Marc Andre Wittorf
defaultPaths
:: [String]
Default search paths (obtained from CURRYPATH environment variable) |
mapJust
:: (a -> b) -> Maybe a -> Maybe b
Basically the Maybe functor instance |
normaliser
:: Maybe String -> IO (Maybe String)
Bindable IO action to normalize a file path |
lookupToGet
:: ([String] -> String -> IO (Maybe String)) -> IO String -> [String] -> String -> IO String
Make a lookup (returns Maybe) function to a get function (uses error) |
lookupCurryFile
:: [String] -> String -> IO (Maybe String)
Look up a Curry file in the search paths |
getCurryFile
:: [String] -> String -> IO String
Get a Curry file in the search paths. |
lookupFlatFile
:: [String] -> String -> IO (Maybe String)
Look up a Typed FlatCurry file in the search paths |
getFlatFile
:: [String] -> String -> IO String
Get a Typed FlatCurry file in the search paths. |
lookupTypeDepsFile
:: [String] -> String -> IO (Maybe String)
Look up a Type Dependency file in the search paths |
lookupTypeDepsFileRaw
:: [String] -> String -> IO (Maybe String)
Look up a Type Dependency file. |
getTypeDepsFile
:: [String] -> String -> IO String
Get a Type Dependency file in the search paths. |
getTypeDepsFileRaw
:: [String] -> String -> IO String
Get a Type Dependency file. |
lookupICurryFile
:: [String] -> String -> IO (Maybe String)
Look up an ICurry file in the search paths |
lookupICurryFileRaw
:: [String] -> String -> IO (Maybe String)
Look up an ICurry file in the search paths. |
getICurryFile
:: [String] -> String -> IO String
Get an ICurry file in the search paths. |
getICurryFileRaw
:: [String] -> String -> IO String
Get an ICurry file in the search paths. |
getPathForModule
:: [String] -> String -> IO String
Get the root directory where a module is located under Example: a module Foo.Bar that can be found under /dir/subdir/Foo/Bar.curry will cause a return value of /dir/subdir |
readFlat
:: [String] -> String -> IO (AProg TypeExpr)
Read a FlatCurry file. |
readTypeDeps
:: [String] -> String -> IO [((String,String),(TypeExpr,[Int]))]
Read a Type Dependency file. |
readICurry
:: [String] -> String -> IO IProg
Read an ICurry file. |
readICurryRaw
:: [String] -> String -> IO IProg
Read an ICurry file. |
writeTypeDeps
:: [String] -> String -> [((String,String),(TypeExpr,[Int]))] -> IO ()
Write a Type Dependency file. |
writeICurry
:: [String] -> String -> IProg -> IO ()
Write an ICurry file. |
icurryFrontendTarget
:: FrontendTarget
The correct target for frontend invocation to translate to Typed FlatCurry |
moduleRoot
:: String -> String -> String
Get the module root path from a module path and its name |
workaround
:: a -> a -> a
Dispatch something based on if a compiler version is buggy |
Default search paths (obtained from CURRYPATH environment variable) |
Basically the Maybe functor instance
|
Bindable IO action to normalize a file path
|
Make a lookup (returns Maybe) function to a get function (uses error)
|
Look up a Curry file in the search paths
|
Get a Curry file in the search paths. Error if not found
|
Look up a Typed FlatCurry file in the search paths
|
Get a Typed FlatCurry file in the search paths. Error if not found
|
Look up a Type Dependency file in the search paths
|
Look up a Type Dependency file. Don't append the .curry subdirectory
|
Get a Type Dependency file in the search paths. Error if not found
|
Get a Type Dependency file. Don't append the .curry subdirectory. Error if not found
|
Look up an ICurry file in the search paths
|
Look up an ICurry file in the search paths. Don't append .curry subdirectory
|
Get an ICurry file in the search paths. Error if not found
|
Get an ICurry file in the search paths. Don't append .curry subdirectory. Error if not found
|
Get the root directory where a module is located under Example: a module Foo.Bar that can be found under /dir/subdir/Foo/Bar.curry will cause a return value of /dir/subdir
|
Read a FlatCurry file. Error if not found
|
Read a Type Dependency file. Error if not found
|
Read an ICurry file. Error if not found
|
Read an ICurry file. Don't append .curry subdir. Error if not found
|
Write a Type Dependency file. Find target directory based on source file
|
Write an ICurry file. Find target directory based on source file
|
The correct target for frontend invocation to translate to Typed FlatCurry |
Get the module root path from a module path and its name
|
Dispatch something based on if a compiler version is buggy
|