Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Haskell
Wiki community
Recent changes
Random page
HaskellWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
HIDE/Design/Project management
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Finding the package for a source file === There should also be a function to find the BuildInfo corresponding to a given source file. This is for cases like the interactive type checker. It needs to know what setting to use for any given source file. So it will use this function: ProjectManagement.getBuildInfoForFile :: FilePath -> IO (Maybe BuildInfo) The project management component will figure out this mapping when the build tree root is set by reading the .cabal file(s) and figuring out which source files belong to it/them. If a source file does not belong to any cabal package (for example if the user has not created any .cabal file or if it's merely some test module that is not part of the normal project build) then of course getBuildInfoForFile will return Nothing. In this case the interactive type checker would still be able to check the file but it would use default settings, as if the user were using ghc --make with no other flags. Note that this allows us to extend things later for the case of more than one .cabal file in a build tree. Though it does make the (not unreasonable) assumption that each source file belongs to at most one cabal package.
Summary:
Please note that all contributions to HaskellWiki are considered to be released under simple permissive license (see
HaskellWiki:Copyrights
for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
Cancel
Editing help
(opens in new window)
Toggle limited content width