code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Expression.Type where
import Context.Type
import Way.Type
import {-# SOURCE #-} Builder
import qualified Hadrian.Expression as H
-- | @Expr a@ is a computation that produces a value of type @Action a@ and can
-- read parameters of the current build 'Target'.
type Expr a = H.Expr Context Builder a
-- | The fo... | bgamari/shaking-up-ghc | src/Expression/Type.hs | bsd-3-clause | 594 | 0 | 6 | 110 | 87 | 54 | 33 | 9 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
module NormalizationTests where
import Prose.Internal.NormalizationTest as NT
import Prose.Normalization as Norm
g1_check = all ok NT.normalizationtest
where ok ([src,nfc,nfd,nfkc,nfkd] :: [String])
-- TR44; NormalizationTest.txt
= and [nfd == Norm... | llelf/prose | tests/NormalizationTests.hs | bsd-3-clause | 1,070 | 0 | 12 | 446 | 258 | 137 | 121 | 22 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
-- |
-- Module: Main
-- Description: HLint tests executor
-- Copyright: (c) 2015-2016, Ixperta Solutions s.r.o.
-- License: BSD3
--
-- Stability: stable
-- Portability: NoImplicitPrelude
--
-- HLint tests executor.
module Main (main)
where
import Control.Monad (u... | IxpertaSolutions/windows-named-pipes | test/hlint.hs | bsd-3-clause | 708 | 0 | 9 | 137 | 161 | 97 | 64 | 15 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ViewPatterns #-}
---------------------------------... | xmonad/xmonad-contrib | XMonad/Prompt.hs | bsd-3-clause | 76,821 | 0 | 24 | 22,703 | 16,828 | 8,993 | 7,835 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Fog
-- Copyright : (c) Sven Panne 2002-2005
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer : sven.panne@aedion.de
-- Stability : provisional... | FranklinChen/hugs98-plus-Sep2006 | packages/OpenGL/Graphics/Rendering/OpenGL/GL/Fog.hs | bsd-3-clause | 6,069 | 67 | 14 | 1,010 | 1,356 | 732 | 624 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module HipChat.Types.WebPanel where
-- https://www.hipchat.com/docs/apiv2/webpanels
import Data.Aeson
import Data.Aeson.Casing
import Data.Aeson.Types
import Data.Monoid
import Data.Text (... | oswynb/hipchat-hs | lib/HipChat/Types/WebPanel.hs | bsd-3-clause | 2,057 | 0 | 9 | 476 | 344 | 194 | 150 | 35 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Data.PHPSession
-- Copyright: (c) 2013-2014 Edward Blake
-- License: BSD-style
-- Maintainer: Edward L. Blake <edwardlblake@gmail.com>
-- Stability: experimental
-- Portability: portable
--
-- Types used for representing PHP data types from encoding and decoding a PHP... | elblake/hs-php-session | Data/PHPSession/Types.hs | bsd-3-clause | 8,891 | 0 | 9 | 1,379 | 1,570 | 796 | 774 | 96 | 0 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Ordinal.UK.Corpus
( corpus ) where
import Prelude
import D... | facebookincubator/duckling | Duckling/Ordinal/UK/Corpus.hs | bsd-3-clause | 1,825 | 0 | 9 | 727 | 294 | 177 | 117 | 53 | 1 |
{-# LANGUAGE ForeignFunctionInterface #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Win32.Com.ClassFactory
-- Copyright : (c) Sigbjorn Finne <sof@dcs.gla.ac.uk> 1998-99
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintain... | jjinkou2/ComForGHC7.4 | System/Win32/Com/ClassFactory.hs | bsd-3-clause | 3,080 | 57 | 15 | 642 | 796 | 428 | 368 | 63 | 2 |
module Math.Statistics.WCC.Types where
data WCCParams = WCCParams { windowIncrement :: Int -- ^ Window increment
, windowSize :: Int -- ^ Window size
-- , maxLag :: Int -- ^ max lag
, lagSteps :: Int -- ^ max lag
... | runebak/wcc | Source/Math/Statistics/WCC/Types.hs | bsd-3-clause | 428 | 0 | 8 | 207 | 53 | 36 | 17 | 6 | 0 |
-- |Maintains a persistent HTTP connection to a CouchDB database server.
-- CouchDB enjoys closing the connection if there is an error (document
-- not found, etc.) In such cases, 'CouchMonad' will automatically
-- reestablish the connection.
module Database.CouchDB.HTTP
( request
, RequestMethod (..)
, CouchMo... | arjunguha/haskell-couchdb | src/Database/CouchDB/HTTP.hs | bsd-3-clause | 6,550 | 0 | 19 | 1,671 | 1,723 | 898 | 825 | 145 | 3 |
module Main where
import Control.Monad.Loops
import Graphics.UI.GLFW as GLFW
import Graphics.Rendering.OpenGL.GL as GL
main :: IO ()
main = do
GLFW.init
windowHint $ WindowHint'ContextVersionMajor 3
windowHint $ WindowHint'ContextVersionMinor 3
windowHint $ WindowHint'OpenGLProfile OpenGLProfile'Core
... | atwupack/LearnOpenGL | app/1_Getting-started/1_Hello-window/Hello-window.hs | bsd-3-clause | 819 | 0 | 16 | 217 | 221 | 106 | 115 | 22 | 2 |
module Tree (showTree) where
showTree = do
putStrLn $ "values = " ++ (show values)
putStrLn $ "tree = " ++ (show tree)
putStrLn $ "doubleTree = " ++ (show doubleTree)
where
values = [5, 4, 3, 7, 8, 6, 2, 9, 0]
tree = foldl insertTree EmptyNode values
doubleTree = fmap (*2) tree
data Node a = Empt... | ibraimgm/learn-haskell | src/Tree.hs | bsd-3-clause | 764 | 0 | 9 | 185 | 366 | 187 | 179 | 18 | 1 |
import Turbinado.Controller
createCounter :: Controller ()
createCounter = do clearLayout
setCookie $ mkCookie "counter" (show 0)
setViewDataValue "show-me" "0"
incrementCounter :: Controller ()
incrementCounter = do clearLayout
c <- getCookie "counter"
... | alsonkemp/turbinado-website | App/Controllers/TestCookies.hs | bsd-3-clause | 886 | 0 | 16 | 365 | 222 | 102 | 120 | 18 | 2 |
module Main where
import Data.ByteString as B
import Finder
main :: IO ()
main = do
bs <- getFingerPrint4 "/Users/eiji/work/1227-26.jpg"
Prelude.putStrLn $ show $ B.unpack bs
bs' <- getFingerPrint4 "/Users/eiji/work/1227-1.jpg"
Prelude.putStrLn $ show $ B.unpack bs'
| eijian/picfinder | src/Main-t4.hs | bsd-3-clause | 277 | 0 | 9 | 46 | 85 | 42 | 43 | 9 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Database.DSH.Backend.Sql.MultisetAlgebra.Opt.Rewrite
( maRules
) where
import Control.Monad
import Database.Algebra.Dag.Common
import Database.DSH.Common.Opt
import Database.DSH.Common.QueryPlan
import Database.DSH.Com... | ulricha/dsh-sql | src/Database/DSH/Backend/Sql/MultisetAlgebra/Opt/Rewrite.hs | bsd-3-clause | 8,413 | 0 | 7 | 2,790 | 632 | 365 | 267 | 164 | 1 |
-----------------------------------------------------------------------------
--
-- Machine-dependent assembly language
--
-- (c) The University of Glasgow 1993-2004
--
-----------------------------------------------------------------------------
{-# OPTIONS -fno-warn-tabs #-}
-- The above warning supression flag is a... | ekmett/ghc | compiler/nativeGen/SPARC/Instr.hs | bsd-3-clause | 15,852 | 445 | 15 | 4,440 | 5,016 | 2,638 | 2,378 | 304 | 39 |
cabal sandbox init
cabal sandbox add-source deps/servant/servant
cabal sandbox add-source deps/servant/servant-client
| imalsogreg/servant-client-reflex-dom | init-sandbox.hs | bsd-3-clause | 118 | 0 | 9 | 11 | 62 | 25 | 37 | -1 | -1 |
{-# LANGUAGE GADTs, TypeFamilies, TypeOperators, EmptyDataDecls, FlexibleInstances, MultiParamTypeClasses, QuasiQuotes #-}
-------------------------------------------------------------------------
-- lambda lifting for the lambda calculus with top-level declarations
----------------------------------------------------... | eddywestbrook/hobbits | archival/LambdaLifting_LSkel.hs | bsd-3-clause | 18,227 | 443 | 12 | 4,092 | 5,380 | 2,762 | 2,618 | -1 | -1 |
{-# LANGUAGE QuasiQuotes #-}
module Test7 () where
import LiquidHaskell
[lq| inline gt :: Int -> Int -> Bool |]
gt x y = x > y
[lq| type IntGT X = { v:Int | gt v X } |]
[lq| thing :: x:Int -> IntGT {x} |]
thing x = 0
| spinda/liquidhaskell | benchmarks/gsoc15/neg/test7.hs | bsd-3-clause | 223 | 0 | 5 | 58 | 54 | 34 | 20 | 8 | 1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
module Duckling.Ti... | rfranek/duckling | tests/Duckling/Time/HR/Tests.hs | bsd-3-clause | 590 | 0 | 9 | 95 | 80 | 51 | 29 | 11 | 1 |
module Matterhorn.State.Flagging
( loadFlaggedMessages
, updateMessageFlag
)
where
import Prelude ()
import Matterhorn.Prelude
import Data.Function ( on )
import qualified Data.Set as Set
import qualified Data.HashMap.Strict as HM
import Lens.Micro.Platform
import ... | matterhorn-chat/matterhorn | src/Matterhorn/State/Flagging.hs | bsd-3-clause | 3,073 | 0 | 32 | 1,041 | 686 | 338 | 348 | -1 | -1 |
-- | Now we plot!
module QuickHullDraw where
import Control.Arrow
import Data.List
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as UV
import Graphics.Rendering.Plot
import Numeric.LinearAlgebra (Vector (..))
import QuickHull... | emmanueldenloye/QuickHull | src/QuickHullDraw.hs | bsd-3-clause | 1,910 | 0 | 16 | 574 | 738 | 392 | 346 | 54 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE Templat... | kmerz/readmegen | src/Main.hs | bsd-3-clause | 7,256 | 15 | 27 | 1,730 | 2,298 | 1,130 | 1,168 | 180 | 8 |
{- |
Module : SAWScript.JavaExpr
Description : Data structures for Java expressions and types.
License : BSD3
Maintainer : atomb
Stability : provisional
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-... | GaloisInc/saw-script | src/SAWScript/JavaExpr.hs | bsd-3-clause | 12,266 | 20 | 26 | 3,261 | 3,491 | 1,798 | 1,693 | 294 | 12 |
module Paths_99HaskellProblems (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
import Prelude
catchIO :: IO a -> (Exception.IOException ... | chemouna/99Haskell | .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen/Paths_99HaskellProblems.hs | bsd-3-clause | 1,826 | 0 | 10 | 177 | 362 | 206 | 156 | 28 | 1 |
module Data.Vector.Mutable.Static where
| copumpkin/vector-static | Data/Vector/Mutable/Static.hs | bsd-3-clause | 41 | 0 | 3 | 4 | 8 | 6 | 2 | 1 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
module Test where
import Control.Monad.Compat
| beni55/base-compat | check/check-hs/Control.Monad.Compat.check.hs | mit | 81 | 0 | 4 | 9 | 11 | 8 | 3 | 3 | 0 |
{-- snippet Predicate --}
import Control.Monad (filterM)
import System.Directory (Permissions(..), getModificationTime, getPermissions)
import System.Time (ClockTime(..))
import System.FilePath (takeExtension)
import Control.Exception (bracket, handle)
import System.IO (IOMode(..), hClose, hFileSize, openFile)
-- the ... | binesiyu/ifl | examples/ch09/BetterPredicate.hs | mit | 3,962 | 14 | 11 | 971 | 1,316 | 670 | 646 | 79 | 1 |
-- | A light-weight wrapper around @Network.Wai@ to provide easy conduit support.
module Network.Wai.Conduit
( -- * Request body
sourceRequestBody
-- * Response body
, responseSource
, responseRawSource
-- * Re-export
, module Network.Wai
) where
import Network.Wai
import Data.Con... | sol/wai | wai-conduit/Network/Wai/Conduit.hs | mit | 1,822 | 0 | 15 | 531 | 450 | 242 | 208 | 45 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ViewPatterns #-}
-- Tests for Statistics.Test.NonParametric
module Tests.NonParametric (tests) where
import Statistics.Distribution.Normal (standard)
import Statistics.Test.KolmogorovSmirnov
import Statistics.Test.MannWhitneyU
import Statistics.Test.KruskalWallis
impo... | bos/statistics | tests/Tests/NonParametric.hs | bsd-2-clause | 12,686 | 0 | 14 | 4,637 | 4,223 | 2,583 | 1,640 | 222 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[StgStats]{Gathers statistical information about programs}
The program gather statistics about
\begin{enumerate}
\item number of boxed cases
\item number of unboxed cases
\item number of let-no-escapes
\item number of non-updatable lets
\item numbe... | rahulmutt/ghcvm | compiler/Eta/SimplStg/StgStats.hs | bsd-3-clause | 5,342 | 0 | 13 | 1,565 | 1,041 | 552 | 489 | 93 | 15 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
--
-- Copyright (c) 2009-2011, ERICSSON AB
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- mod... | emwap/feldspar-language | src/Feldspar/Core/Frontend/SizeProp.hs | bsd-3-clause | 3,695 | 0 | 11 | 679 | 423 | 240 | 183 | 25 | 1 |
-- (c) The University of Glasgow 2006
{-# LANGUAGE CPP #-}
-- This module used to take 10GB of memory to compile with the new
-- (Nov '15) pattern-match checker.
module OptCoercion ( optCoercion, checkAxInstCo ) where
#include "HsVersions.h"
import TyCoRep
import Coercion
import Type hiding( substTyVarBndr, subst... | mcschroeder/ghc | compiler/types/OptCoercion.hs | bsd-3-clause | 32,980 | 0 | 19 | 8,391 | 7,814 | 3,930 | 3,884 | -1 | -1 |
-- | ELF header
module Haskus.Format.Elf.Header
( Header (..)
, Type (..)
, Arch (..)
, elfCurrentVersion
, getHeader
, putHeader
)
where
import Haskus.Format.Binary.Word
import Haskus.Format.Binary.Get
import Haskus.Format.Binary.Put
import Haskus.Format.Elf.PreHeader
-- | ELF Header
-- We use 6... | hsyl20/ViperVM | haskus-system/src/lib/Haskus/Format/Elf/Header.hs | bsd-3-clause | 10,757 | 0 | 22 | 4,137 | 1,915 | 1,071 | 844 | 311 | 1 |
module Yesod.Test.Extension
( getWithParams
, postForJSON
, postForm
, valueEquals
, module Yesod.Test
) where
import Prelude
import Yesod.Test
import Test.Hspec.Expectations.Lifted
import Yesod (Yesod, RedirectUrl)
import Data.Aeson (Value, eitherDecode)
import Data.Text (Text)
import Network... | vaporware/carnival | test/Yesod/Test/Extension.hs | mit | 1,700 | 0 | 10 | 428 | 421 | 223 | 198 | 45 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Plugins.Monitors.Weather
-- Copyright : (c) Andrea Rossato
-- License : BSD-style (see LICENSE)
--
-- Maintainer : Jose A. Ortega Ruiz <jao@gnu.org>
-- Stability : unstable
-- Portability : unportable
--
-... | tsiliakis/xmobar | src/Plugins/Monitors/Weather.hs | bsd-3-clause | 4,229 | 0 | 15 | 1,487 | 1,175 | 596 | 579 | 111 | 2 |
module GameEngine.Data.MD3 where
import Data.Int
import Data.Map (Map)
import Data.HashMap.Strict
import Data.Vect hiding (Vector)
import Data.Vector (Vector)
import Data.ByteString (ByteString)
import qualified Data.Vector.Storable as SV
data Frame
= Frame
{ frMins :: !Vec3
, frMaxs :: !Vec3
, ... | csabahruska/quake3 | game-engine/GameEngine/Data/MD3.hs | bsd-3-clause | 1,136 | 0 | 14 | 321 | 335 | 192 | 143 | 78 | 0 |
module Database.Schema.Migrations.Backend.HDBC
( hdbcBackend
)
where
import Database.HDBC
( quickQuery'
, fromSql
, toSql
, IConnection(getTables, run, runRaw)
, commit
, rollback
, disconnect
)
import Database.Schema.Migrations.Backend
( Backend(..)
, rootMigrationName
)
import Da... | nathankot/dbmigrations | src/Database/Schema/Migrations/Backend/HDBC.hs | bsd-3-clause | 2,343 | 0 | 14 | 837 | 484 | 268 | 216 | 53 | 2 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module ClientHandler where
import Prelude hiding (head,init,last,readFile, tail, writeFile)
import Data.Aeson.Types
import Yesod
import Foundation
import Controllers
import ClientRoutes
data ClientHandler = ClientHandler {
... | smurphy8/backoffice | ClientHandler.hs | bsd-3-clause | 1,740 | 0 | 9 | 373 | 211 | 130 | 81 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="tr-TR">
<title>Regular Expression Tester</title>
<maps>
<homeID>regextester</homeID>
<m... | kingthorin/zap-extensions | addOns/regextester/src/main/javahelp/help_tr_TR/helpset_tr_TR.hs | apache-2.0 | 978 | 77 | 66 | 157 | 409 | 207 | 202 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- | Dynamically look up available executables.
module Plugins
( Plugin
, pluginPrefix
, pluginName
, pluginSummary
, pluginProc
, Plugins
, findPlugins
, listPlugins
, lookupPlugin
, callPlugin
,... | CRogers/stack | src/main/Plugins.hs | bsd-3-clause | 6,634 | 0 | 16 | 1,264 | 1,821 | 963 | 858 | 169 | 3 |
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE MagicHash #-}
import GHC.Exts
import Type.Reflection
main = do
case typeRep @(Int -> Char) of
App a b -> print (a, b)
case typeRep @(Int# -> Char) of
App a b -> print (a, b)
case typeRep @(Int# -> Char) of
App a b -> print $ App a (typeRep ... | ezyang/ghc | testsuite/tests/typecheck/should_run/T14236.hs | bsd-3-clause | 329 | 0 | 14 | 90 | 143 | 71 | 72 | 11 | 1 |
module ForkMVars where
import Control.Concurrent
import Control.Monad
import System.IO
main = do
m <- newEmptyMVar
forkIO $ do putMVar m 'x'; putMVar m 'y'
r <- takeMVar m
print r
r <- takeMVar m
print r
| NickAger/LearningHaskell | ParallelConcurrent/ForkExperiments.hsproj/ForkMVars.hs | mit | 231 | 0 | 10 | 63 | 87 | 40 | 47 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Aeson
import Data.Scientific
import qualified Data.Map as M
import qualified Data.Vector as V
import qualified Data.ByteString.Lazy as B
import qualified Data.HashMap.Lazy as H
import qualified Data.Text as T
foo :: H.HashMap String String
foo = H.singl... | lnunno/advent-of-code-2015 | day12/src/Main.hs | mit | 942 | 0 | 10 | 191 | 307 | 163 | 144 | 33 | 2 |
module Test.Link where
import Import
import Test.Hspec
import Station.Types
test :: SpecWith ()
test = do
describe "the Link implementation" $ do
it "doesn't allow both versions and hashes" $ do
let v = object
[ "id" .= String "a495... | seagreen/station | test/Test/Link.hs | mit | 662 | 0 | 22 | 267 | 158 | 78 | 80 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Examples.SmallMatchNetwork
Description : Predefined network: smn.
Copyright : (c) Tessa Belder 2015.
Predefined networks: smn. Small match network.
-}
module Examples.SmallMatchNetwork (smn) where
import Madl.MsgTypes
import Madl.Network
import Examples.TypesAnd... | julienschmaltz/madl | examples/Examples/SmallMatchNetwork.hs | mit | 1,752 | 0 | 12 | 386 | 394 | 240 | 154 | 29 | 1 |
-- Project: dka-2-mka (FLP 2016/2017)
-- Author: Dávid Mikuš (xmikus1
module Parser.FSM
where
import Data.List
import Type.FSM
import Text.ParserCombinators.ReadP
parseFSM :: String -> Either String FSM
parseFSM s = case readP_to_S fsmParser s of
[(fsm, _)] -> Right fsm
x -> Left "Parser error"
fsmParser :... | Dasio/FIT-Projects | FLP/Parser/FSM.hs | mit | 1,074 | 0 | 12 | 280 | 334 | 163 | 171 | 35 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Yage.Core.Application.Event
( module Event
) where
import Yage.Core.Application.Internal.Event as Event
| MaxDaten/yage-core | src/Yage/Core/Application/Event.hs | mit | 264 | 0 | 4 | 70 | 27 | 21 | 6 | 6 | 0 |
{-|
Module : Web.Facebook.Messenger.Types.Optin
Copyright : (c) Felix Paulusma, 2016
License : MIT
Maintainer : felix.paulusma@gmail.com
Stability : semi-experimental
This callback will occur:
* when the @"Send to Messenger"@ plugin has been tapped;
* when a user has accepted a message request using Cust... | Vlix/facebookmessenger | src/Web/Facebook/Messenger/Types/Callbacks/Optin.hs | mit | 2,137 | 0 | 11 | 433 | 185 | 113 | 72 | 17 | 0 |
-- 1. max (length [1, 2, 3]) (length [8, 9, 10, 11, 12])
-- 5
-- 2. compare (3 * 4) (3 * 5)
-- LT
-- 3. compare "Julie" True
-- won't work.
-- 4. (5 + 3) > (3 + 6)
-- False
| diminishedprime/.org | reading-list/haskell_programming_from_first_principles/06_07.hs | mit | 176 | 0 | 2 | 48 | 10 | 9 | 1 | 1 | 0 |
{-# LANGUAGE OverloadedStrings, TupleSections #-}
module Y2020.M08.D26.Solution where
import Y2020.M08.D25.Solution
{--
Yesterday, we read in the top-downloaded project gutenberg books with their
associated URLs to the book-pages, but, if you followed any of those links
you see those links aren't the books, themselv... | geophf/1HaskellADay | exercises/HAD/Y2020/M08/D26/Solution.hs | mit | 3,491 | 0 | 12 | 642 | 384 | 221 | 163 | 33 | 1 |
module Network.Gazelle.Routes.Index (
indexRoute
) where
import Network.API.Builder
import Network.HTTP.Types.Method
import Data.Text (Text)
indexRoute :: Route
indexRoute = Route {
urlPieces = [],
urlParams = [ "action" =. ("index" :: Text) ],
httpMethod = renderStdMethod GET
}
| mr/gazelle | src/Network/Gazelle/Routes/Index.hs | mit | 299 | 0 | 9 | 56 | 84 | 53 | 31 | 10 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Galua.Debugger.View.Utils
( exportFID
, computeFunNames
) where
import Data.Maybe(fromMaybe)
import Data.List(sortBy)
import Data.Function(on)
import qualified Data.Aeson as JS
import qualified Data.Vector as Vector
import Data.Str... | GaloisInc/galua | galua-dbg/src/Galua/Debugger/View/Utils.hs | mit | 1,665 | 0 | 17 | 563 | 494 | 269 | 225 | 41 | 2 |
{- Alec Snyder
- mailServer Server
- github: https://github.com/allonsy/mailServer
-}
module Main where
import Control.Concurrent.MVar
import Control.Concurrent
import Control.Exception
import Data.ByteString.Char8 (ByteString)
import Data.Map.Strict hiding (map)
import EncryptMail
import Network
import System.Console... | allonsy/mailServer | src/Server.hs | mit | 13,350 | 10 | 22 | 4,593 | 3,411 | 1,602 | 1,809 | 294 | 6 |
{-|
Module : Language.Vigil.SimplifyTraversal
Description : Convert a typechecked GoLite program to a Vigil program
Copyright : (c) Jacob Errington and Frederic Lafrance, 2016
License : MIT
Maintainer : goto@mail.jerrington.me
Stability : experimental
Contains the transformation functions from a typechec... | djeik/goto | libgoto/Language/Vigil/Types.hs | mit | 7,561 | 0 | 22 | 2,027 | 2,136 | 1,123 | 1,013 | 184 | 15 |
module Main (main) where
import Whip.Parser (parse)
import Whip.Types (Expr(..))
import Whip.Interpreter (runProgram)
import Control.Applicative ((<$>))
import qualified Data.Map as M
lmap :: (a -> b) -> Either a c -> Either b c
lmap f = either (Left . f) Right
maybeToEither :: a -> Maybe b -> Either a b
maybeToEith... | L8D/whip-hs | src/Main.hs | mit | 711 | 0 | 15 | 194 | 285 | 144 | 141 | 20 | 3 |
module GHCJS.DOM.DataTransferItem (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/DataTransferItem.hs | mit | 46 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module EdaxProtocol (
commandLoop,
evalHelper,
hashHelper,
SearchingMethod(..),
LearningMethod(..),
Mode(..)
) where
-- friends
-- import qualified Util
-- import qualified Piece
import qualified BitBoard
import qualified Move
import qualified Search
import qualified Util
import qualified Eval
-... | ysnrkdm/Hamlet | src/EdaxProtocol.hs | mit | 3,659 | 0 | 23 | 1,258 | 941 | 473 | 468 | 76 | 21 |
test :: Int -> Int
test n = n + 1
| little-schemer/test | new01/test.hs | mit | 34 | 0 | 5 | 11 | 22 | 11 | 11 | 2 | 1 |
-- |Engine module contains internal methods for node, buffer, and bus allocation
module Haskollider.Engine where
import Haskollider.Integer
import Debug.Trace
import qualified Data.Vector as V
type NodeID = Int
-- |Default initial node
initialNodeID :: NodeID
initialNodeID = 1000
-- |Given a previous node id, retur... | ChadMcKinney/Haskollider | src/Haskollider/Engine.hs | gpl-2.0 | 3,398 | 14 | 21 | 641 | 1,192 | 640 | 552 | 61 | 3 |
module SimpleJSON
(
JValue(..)
, jGetBool
, jGetInt
, jGetDouble
, jGetObject
, jGetArray
, jIsNull
, jPutValue
) where
import Data.List
data JValue = JString String
| JNumber Double
| JNull
| JBool Bool
| JObject [(String, JValue)]
| JArray [JValue] deriving ( Eq, Ord, Show )
jGetBool ... | Tr1p0d/realWorldHaskell | rwh5/SimpleJSON.hs | gpl-2.0 | 1,223 | 30 | 9 | 295 | 511 | 265 | 246 | 43 | 3 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Lice... | karamellpelle/grid | designer/source/File/Binary/Reader.hs | gpl-3.0 | 8,263 | 0 | 16 | 2,292 | 2,076 | 1,085 | 991 | -1 | -1 |
-- |
module ExercisesMonoid where
| capitanbatata/sandbox | my-typeclassopedia/my-typeclassopedia-haskell/src/ExercisesMonoid.hs | gpl-3.0 | 37 | 0 | 2 | 8 | 5 | 4 | 1 | 1 | 0 |
module Main where
import Test.Hspec
import Test.Network.HTTP.Rest.Client
import Test.Network.HTTP.Rest.Server
main :: IO ()
main = hspec $ do
clientSpec
serverSpec
| plcplc/typed-rest | types/test/unit-main.hs | gpl-3.0 | 171 | 0 | 7 | 27 | 50 | 30 | 20 | 8 | 1 |
module Control.Trigger
( module Control.Trigger.Monad
, module Control.Trigger.Flow
, lift, get, modify, put
, statefulT
) where
import Control.Trigger.Monad
import Control.Trigger.Flow
import Control.Monad.State
import Control.Monad.Trans
-- | Evaluate a state transformed trigger. The StateT is... | talanis85/mudblood | src/Control/Trigger.hs | gpl-3.0 | 557 | 0 | 12 | 109 | 169 | 97 | 72 | -1 | -1 |
module Example.Eg51 (eg51) where
import Graphics.Radian
import ExampleUtils
d :: PlotData
d = let x = [1..10]
y = [2, 4, 8, 16, 32, 48, 24, 12, 6, 3]
in MapData [("x", x), ("y", x)]
eg51 :: IO Html
eg51 = do
let os = [ height.=300, aspect.=3, strokeWidth.=2, fill.="skyblue" ]
plot1 = Plot [bs1] #... | openbrainsrc/hRadian | examples/Example/Eg51.hs | mpl-2.0 | 679 | 8 | 13 | 171 | 295 | 164 | 131 | -1 | -1 |
import Data.List
import qualified Data.Set as S
primes = 2 : filter ((==1) . length . primeFactors) [3,5..]
primeFactors n = S.toList $ S.fromList $ factor n primes
where
factor n (p:ps)
| p*p > n = [n]
| n `mod` p == 0 = p : factor (n `div` p) (p:ps)
| otherwise = facto... | jdavidberger/project-euler | prob124.hs | lgpl-3.0 | 733 | 0 | 13 | 268 | 375 | 200 | 175 | 17 | 4 |
{-# LANGUAGE BangPatterns, FlexibleContexts #-}
-- | Provides a way to estimate the value of a pixel at rational coordinates
-- using a linear interpolation.
module Vision.Image.Interpolate (
Interpolable (..), bilinearInterpol
) where
import Data.Int
import Data.RatioInt (denominator, numerator)
import Dat... | TomMD/friday | src/Vision/Image/Interpolate.hs | lgpl-3.0 | 4,071 | 0 | 13 | 1,267 | 979 | 502 | 477 | 79 | 1 |
{-# LANGUAGE RecordWildCards, ViewPatterns, ScopedTypeVariables #-}
module Main(main) where
import Development.Shake.Command
import Util
import OBJ
import Surface
import Metadata
import Grouping
import Data.Function
import Data.Maybe
import Data.List
import Control.Applicative
import Control.Monad
import System.IO
im... | ndmitchell/fossilizer | Main.hs | apache-2.0 | 7,792 | 0 | 25 | 2,329 | 3,044 | 1,578 | 1,466 | 145 | 3 |
{-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-}
import Database.MongoDB (Action, Document, Document, Value, access,
close, connect, delete, exclude, find,
host, insertMany, master, project, rest,
runIOE, select, sort, (=:))... | selectel/mongoDB-haskell | doc/Example.hs | apache-2.0 | 1,767 | 0 | 11 | 390 | 614 | 331 | 283 | 35 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QMenu_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:30
Warning : this file is machine generated - do not m... | keera-studios/hsQt | Qtc/Gui/QMenu_h.hs | bsd-2-clause | 54,431 | 0 | 18 | 12,271 | 18,825 | 9,082 | 9,743 | -1 | -1 |
module App.Input where
import Graphics.UI.GLFW
import Control.Monad
{- Defining -}
data InputState = InputState { _keysPressed :: [Key]
, _mousePosition :: (Double, Double)
, _mouseButtonsPressed :: [MouseButton]
, _w... | schell/blocks | src/App/Input.hs | bsd-3-clause | 3,979 | 0 | 13 | 1,128 | 1,139 | 624 | 515 | 74 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
module Lucid.Foundation.Typography.InlineList where
import Lucid.Base
import Lucid.Html5
import qualified Data.Text as T
import Data.Monoid
inline_list_ :: T.Text
inline_list_ = " inline-list "
| athanclark/lucid-foundation | src/Lucid/Foundation/Typography/InlineList.hs | bsd-3-clause | 272 | 0 | 5 | 35 | 45 | 30 | 15 | 9 | 1 |
module Data.Text.Emotion where
import Data.Text.Emotion.Internal
| athanclark/acme-emoticons | src/Data/Text/Emotion.hs | bsd-3-clause | 66 | 0 | 4 | 6 | 14 | 10 | 4 | 2 | 0 |
module Problem61 where
main :: IO ()
main =
print
. sum
. head
. filter (\soln -> head soln `endsWithStartOf` last soln)
. cyclicFigurate
$ [3 .. 8]
cyclicFigurate :: [Int] -> [[Int]]
cyclicFigurate [x] = map (: []) $ filter (isFigurateNumber x) [1000 .. 9999]
cyclicFigurat... | adityagupta1089/Project-Euler-Haskell | src/problems/Problem61.hs | bsd-3-clause | 1,343 | 0 | 14 | 392 | 535 | 291 | 244 | 33 | 2 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
-- of patent rights can be found in the PATENTS file in the same directory.
module Duckling.T... | rfranek/duckling | tests/Duckling/Time/ES/Tests.hs | bsd-3-clause | 591 | 0 | 9 | 96 | 80 | 51 | 29 | 11 | 1 |
module JDec.Class.Parse.ParseAnnotation (
deserializeAnnotation,
deserializeAnnotationElementValue
) where
import JDec.Class.Raw.Annotation (Annotation(Annotation), AnnotationElementValue(AnnotationElementConstByteValue, AnnotationElementConstCharValue, AnnotationElementConstDoubleValue, AnnotationElementConstFloatV... | rel-eng/jdec | src/JDec/Class/Parse/ParseAnnotation.hs | bsd-3-clause | 3,832 | 0 | 17 | 554 | 758 | 385 | 373 | 64 | 14 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
module GHC.Util.FreeVars (
vars, varss, pvars,
Vars (..), FreeVars(..) , AllVars (..)
) where
import GHC.Types.Name.Reader
import GHC.Types.Name.Occurrence
import GHC.Types.Name
import GHC.Hs
import GHC.Types.... | ndmitchell/hlint | src/GHC/Util/FreeVars.hs | bsd-3-clause | 13,464 | 0 | 16 | 2,649 | 3,819 | 1,970 | 1,849 | 149 | 1 |
{-# LANGUAGE PatternGuards, CPP #-}
{-# OPTIONS_GHC -Wall #-}
module System.Console.ShSh.Path ( findExecutable, fixExports ) where
-- |Here is where we put all the stuff related to path lookups, including
-- the messy platform-independence issues.
import Control.Applicative ( (<|>) )
import Control.Monad ( msum, mpl... | shicks/shsh | System/Console/ShSh/Path.hs | bsd-3-clause | 3,183 | 0 | 12 | 946 | 855 | 474 | 381 | 42 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Model definition parser, served model routines.
module Snap.Snaplet.Redson.Snapless.Metamodel
where
import Control.Applicative
import Data.Aeson
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as LB
import Data.Le... | dzhus/snaplet-redson | src/Snap/Snaplet/Redson/Snapless/Metamodel.hs | bsd-3-clause | 9,302 | 0 | 27 | 3,487 | 1,903 | 1,024 | 879 | 176 | 6 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UndecidableInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.GeoJSON.Featur... | alios/geojson-types | src/Data/GeoJSON/Features.hs | bsd-3-clause | 6,495 | 0 | 14 | 1,329 | 1,892 | 994 | 898 | -1 | -1 |
{-# OPTIONS -fno-warn-type-defaults #-}
-- ----------------------------------------------------------------------------
-- | Handle conversion of CmmProc to LLVM code.
--
{-# LANGUAGE GADTs #-}
module LlvmCodeGen.CodeGen ( genLlvmProc ) where
#include "HsVersions.h"
import Llvm
import LlvmCodeGen.Base
import LlvmCod... | a-ford/notghc | LlvmCodeGen/CodeGen.hs | bsd-3-clause | 62,735 | 0 | 24 | 19,882 | 17,339 | 8,690 | 8,649 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
module Pygmalion.Database.Request
( DBUpdate (..)
, DBRequest (..)
, DBUpdateChan
, DBQueryChan
, newDBUpdateChan
, pushUpdate
, popUpdates
, isEmptyUpdateChan
) where
import Control.Applicative
import Control.Concurrent.STM
import Data.Serialize
import Data.Vector
import GHC.Generics
... | sethfowler/pygmalion | src/Pygmalion/Database/Request.hs | bsd-3-clause | 2,985 | 0 | 11 | 770 | 812 | 417 | 395 | 122 | 1 |
{-# LANGUAGE RankNTypes, NamedFieldPuns, RecordWildCards #-}
module Distribution.Server.Features.PackageContents (
PackageContentsFeature(..),
PackageContentsResource(..),
initPackageContentsFeature
) where
import Distribution.Server.Framework
import Distribution.Server.Framework.ResponseContentTypes as ... | grayjay/hackage-server | Distribution/Server/Features/PackageContents.hs | bsd-3-clause | 8,966 | 0 | 22 | 2,493 | 1,877 | 1,004 | 873 | 168 | 6 |
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.ColorBufferFloat
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portabi... | haskell-opengl/OpenGLRaw | src/Graphics/GL/ARB/ColorBufferFloat.hs | bsd-3-clause | 871 | 0 | 5 | 117 | 77 | 55 | 22 | 13 | 0 |
{-# OPTIONS -Wall #-}
module TuringMachine.Models.TM1 (
mach
) where
import Basic.Types (Pointed(..))
import Basic.MemoryImpl
import TuringMachine.State
import TuringMachine.Machine
--------------------------------------------------------------------------
--------------------------specilized model operations & ... | davidzhulijun/TAM | TuringMachine/Models/TM1.hs | bsd-3-clause | 1,257 | 0 | 8 | 192 | 406 | 238 | 168 | 24 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module ExplosivesInCyberspace (solve) where
import Control.Monad (forM_)
import Text.Parsec.Prim (Stream, ParsecT, parse, many, (<|>), getPosition, parserZero)
import Text.Parsec.Char (anyChar, digit, char, endOfLine, upper)
import Text.Parsec.Combinator (count, many1, eof, manyTill)... | cjlarose/advent-2016 | src/ExplosivesInCyberspace.hs | bsd-3-clause | 1,897 | 0 | 17 | 372 | 720 | 370 | 350 | 42 | 2 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
-- | Perform copy propagation. This is done by invoking the
-- simplifier with no rules, so hoisting and dead-code elimination may
-- also take place.
module Futhark.Transform.CopyPropagate
( copyPropagateInProg,
copyPropagateInStms,
copyPro... | diku-dk/futhark | src/Futhark/Transform/CopyPropagate.hs | isc | 1,256 | 0 | 11 | 203 | 257 | 138 | 119 | 32 | 1 |
{-# LANGUAGE Rank2Types #-}
module GameLogic.Data.World where
import Data.Array
import Control.Lens
import Control.Applicative
import GameLogic.Data.Cell
type WorldPos = (Int, Int)
startWorldPos :: WorldPos
startWorldPos = (1,1)
--TODO: find way do only + -
instance (Num a,Num b) => Num (a, b) where
(a,b) + (c... | EPashkin/gamenumber-freegame | src_gl/GameLogic/Data/World.hs | gpl-3.0 | 2,531 | 0 | 11 | 545 | 959 | 534 | 425 | 61 | 1 |
module End.Object.Fireball where
import End.Collection
import End.Header.Animation
import End.Header.Object
import End.Header.Object.Temp
import End.Collection.Header
import End.Function.Object
import End.Collection.Util
fireBall :: GameState Temp
fireBall = do
objs <- use $ objects.temps
genId <- li... | kwrooijen/sdl-game | End/Object/Fireball.hs | gpl-3.0 | 770 | 0 | 15 | 176 | 288 | 152 | 136 | -1 | -1 |
{-| Scan clusters via RAPI or LUXI and write state data files.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code... | apyrgio/ganeti | src/Ganeti/HTools/Program/Hscan.hs | bsd-2-clause | 5,711 | 0 | 15 | 1,287 | 1,247 | 643 | 604 | 110 | 2 |
module Settings.Flavours.Common where
import Expression
-- See https://gitlab.haskell.org/ghc/ghc/issues/15286 and
-- https://phabricator.haskell.org/D4880
naturalInBaseFixArgs :: Args
naturalInBaseFixArgs = mconcat
[ input "**/Natural.hs" ? pure ["-fno-omit-interface-pragmas"]
, input "**/Num.hs" ? pure ["-fno-i... | sdiehl/ghc | hadrian/src/Settings/Flavours/Common.hs | bsd-3-clause | 350 | 0 | 9 | 38 | 57 | 32 | 25 | 6 | 1 |
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..))
import System.Exit (ExitCode(..), exitWith)
import DNA (hammingDistance)
exitProperly :: IO Counts -> IO ()
exitProperly m = do
counts <- m
exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess
testCase ::... | pminten/xhaskell | point-mutations/point-mutations_test.hs | mit | 1,036 | 0 | 12 | 191 | 300 | 156 | 144 | 24 | 2 |
module Profiling.CUDA.Metrics
( cuptiMetricsInit
, cuptiMetricsEnable
, cuptiMetricsDisable
, cuptiGetMetrics
) where
import Control.Monad (when, forM)
import Data.List (intercalate)
import Data.Word
import Foreign.C.Types
import Foreign.C.String
import Foreign.Marshal.Alloc
import Foreign.Ptr
i... | SKA-ScienceDataProcessor/RC | MS6/dna/cupti/Profiling/CUDA/Metrics.hs | apache-2.0 | 2,929 | 0 | 16 | 679 | 457 | 259 | 198 | 48 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Stack.Options.BuildMonoidParser where
import qualified Data.Text as T
import Options.Applicative
import Options.Applicative.Builder.Extra
import Stack.Build (splitObjsWarning)
import Stack.Prelude
import S... | MichielDerhaeg/stack | src/Stack/Options/BuildMonoidParser.hs | bsd-3-clause | 5,949 | 0 | 30 | 2,135 | 626 | 327 | 299 | 153 | 1 |
import Data.Sequence -- needs to be compiled with -DTESTING for use here
import Control.Applicative (Applicative(..))
import Control.Arrow ((***))
import Data.Array (listArray)
import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap), toList, all, sum)
import Data.Functor ((<$>), (<$))
import Data.Mayb... | iu-parfunc/containers | tests/seq-properties.hs | bsd-3-clause | 19,898 | 0 | 18 | 4,680 | 7,799 | 3,945 | 3,854 | 455 | 2 |
-------------------------------------------------------------------------------
--
-- | Break Arrays in the IO monad
--
-- Entries in the array are Word sized Conceptually, a zero-indexed IOArray of
-- Bools, initially False. They're represented as Words with 0==False, 1==True.
-- They're used to determine whether GHC... | lukexi/ghc-7.8-arm64 | compiler/main/BreakArray.hs | bsd-3-clause | 3,675 | 0 | 20 | 894 | 986 | 494 | 492 | 8 | 1 |
-----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2006
--
-- The purpose of this module is to transform an HsExpr into a CoreExpr which
-- when evaluated, returns a (Meta.Q Meta.Exp) computation analogous to the
-- input HsExpr. We do this in the DsM monad... | mightymoose/liquidhaskell | src/Language/Haskell/Liquid/Desugar/DsMeta.hs | bsd-3-clause | 114,922 | 2,332 | 25 | 30,549 | 26,787 | 14,947 | 11,840 | 1,922 | 16 |
module WhereIn5 where
--A definition can be lifted from a where or let into the surronding binding group.
--Lifting a definition widens the scope of the definition.
--In this example, lift 'sq' in 'sumSquares'
--This example aims to test the lifting of type signature.
sumSquares x y = sq x + rt y
... | kmate/HaRe | old/testing/liftOneLevel/WhereIn5.hs | bsd-3-clause | 527 | 0 | 8 | 207 | 107 | 57 | 50 | 9 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.